summaryrefslogtreecommitdiff
path: root/info.toml
diff options
context:
space:
mode:
authorMario Reder <mreder1289@gmail.com>2020-02-14 15:25:03 +0100
committerMario Reder <mreder1289@gmail.com>2020-02-26 14:07:07 +0100
commit1e2fd9c92f8cd6e389525ca1a999fca4c90b5921 (patch)
treeaace341dbef4b15e37ddf260d6be857a11cca104 /info.toml
parent7e8530b21ff355c9b52e07eb3ba25278746a6932 (diff)
feat: Add clippy lints
- adds a new 'clippy' category for exercises - clippy exercises should throw no warnings - install script now also installs clippy is related to https://github.com/rust-lang/rust-clippy/issues/2604
Diffstat (limited to 'info.toml')
-rw-r--r--info.toml16
1 files changed, 16 insertions, 0 deletions
diff --git a/info.toml b/info.toml
index b1c6db5..82c22b7 100644
--- a/info.toml
+++ b/info.toml
@@ -529,6 +529,22 @@ hint = """
It should be doing some checking, returning an `Err` result if those checks fail, and only
returning an `Ok` result if those checks determine that everything is... okay :)"""
+# CLIPPY
+
+[[exercises]]
+name = "clippy1"
+path = "exercises/clippy/clippy1.rs"
+mode = "clippy"
+hint = """
+Floating point calculations are usually imprecise, so asking if two values are exactly equal is asking for trouble"""
+
+[[exercises]]
+name = "clippy2"
+path = "exercises/clippy/clippy2.rs"
+mode = "clippy"
+hint = """
+`for` loops over Option values are more clearly expressed as an `if let`"""
+
# STANDARD LIBRARY TYPES
[[exercises]]