英語修正 (#236)

* 英語修正

* cargo fmt

* fixed test assertion string data

Co-authored-by: DustInDark <nextsasasa@gmail.com>
This commit is contained in:
Yamato Security
2021-11-27 11:21:55 +09:00
committed by GitHub
parent cc7767a960
commit bc230f7cd5
12 changed files with 153 additions and 139 deletions

View File

@@ -83,7 +83,7 @@ impl ParseYaml {
AlertMessage::warn(
&mut std::io::stdout().lock(),
format!(
"fail to parse as yaml: {}\n{} ",
"Failed to parse yml: {}\n{} ",
entry.path().display(),
yaml_contents.unwrap_err()
),
@@ -109,14 +109,14 @@ impl ParseYaml {
return Option::None;
}
self.rulecounter.insert(
yaml_doc["ruletype"].as_str().unwrap_or("other").to_string(),
yaml_doc["ruletype"].as_str().unwrap_or("Other").to_string(),
self.rulecounter
.get(&yaml_doc["ruletype"].as_str().unwrap_or("other").to_string())
.get(&yaml_doc["ruletype"].as_str().unwrap_or("Other").to_string())
.unwrap_or(&0)
+ 1,
);
if configs::CONFIG.read().unwrap().args.is_present("verbose") {
println!("Loaded yml FilePath: {}", filepath);
println!("Loaded yml file path: {}", filepath);
}
// 指定されたレベルより低いルールは無視する
let doc_level = &yaml_doc["level"]