Repository: dotenv-linter/dotenv-linter (Rust)

Issue:
LowercaseKey: Show check name in message
Right now the message looks like this:
```
.env:2 The FOo_BAR key should be in uppercase
```

Need to add the check name to the message:
```
.env:2 LowercaseKey: The FOo_BAR key should be in uppercase
```


Discussion:
I'll take it



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index efb808470..fe8adfeca 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 ### 🚀 Added
 
 ### 🔧 Changed
+- LowercaseKey: Show check name in the message [#131](https://github.com/mgrachev/dotenv-linter/pull/131) ([@qelphybox](https://github.com/qelphybox))
 - DuplicatedKey: Show check name in message [#138](https://github.com/mgrachev/dotenv-linter/pull/138)([@SaMuRa1ReM1X](https://github.com/SaMuRa1ReM1X))
 - IncorrectDelimiter: Show check name in the message [#146](https://github.com/mgrachev/dotenv-linter/pull/146) ([undef1nd](https://github.com/undef1nd))
 - Replaced kcov with grcov in Github Actions [#143](https://github.com/mgrachev/dotenv-linter/pull/143) ([@pmk21](https://github.com/pmk21))
diff --git a/src/checks/lowercase_key.rs b/src/checks/lowercase_key.rs
index c849f141f..d450f64aa 100644
--- a/src/checks/lowercase_key.rs
+++ b/src/checks/lowercase_key.rs
@@ -2,12 +2,14 @@ use crate::checks::Check;
 use crate::common::*;
 
 pub(crate) struct LowercaseKeyChecker {
+    name: String,
     template: String,
 }
 
 impl Default for LowercaseKeyChecker {
     fn default() -> Self {
         Self {
+            name: String::from("LowercaseKey"),
             template: String::from("The {} key should be in uppercase"),
         }
     }
@@ -19,14 +21,17 @@ impl Check for LowercaseKeyChecker {
         if key.to_uppercase() == key {
             None
         } else {
-            Some(Warning::new(
-                line.clone(),
-                self.template.replace("{}", &key),
-            ))
+            Some(Warning::new(line.clone(), self.message(&key)))
         }
     }
 }
 
+impl LowercaseKeyChecker {
+    fn message(&self, key: &str) -> String {
+        format!("{}: {}", self.name, self.template.replace("{}", key))
+    }
+}
+
 #[cfg(test)]
 mod tests {
     use super::*;
@@ -53,7 +58,7 @@ mod tests {
         };
         let expected = Some(Warning::new(
             line.clone(),
-            String::from("The foo_bar key should be in uppercase"),
+            String::from("LowercaseKey: The foo_bar key should be in uppercase"),
         ));
         assert_eq!(expected, checker.run(&line));
     }
@@ -68,7 +73,7 @@ mod tests {
         };
         let expected = Some(Warning::new(
             line.clone(),
-            String::from("The FOo_BAR key should be in uppercase"),
+            String::from("LowercaseKey: The FOo_BAR key should be in uppercase"),
         ));
         assert_eq!(expected, checker.run(&line));
     }


Test patch:
diff --git a/tests/cli_basic.rs b/tests/cli_basic.rs
index 281285e14..9dba581be 100644
--- a/tests/cli_basic.rs
+++ b/tests/cli_basic.rs
@@ -28,7 +28,7 @@ fn checks_current_dir_with_dot_arg() {
 
     let args = &["."];
     let expected_output = format!(
-        "{}:1 The foo key should be in uppercase\n",
+        "{}:1 LowercaseKey: The foo key should be in uppercase\n",
         testfile.shortname_as_str(),
     );