diff --git a/Cargo.toml b/Cargo.toml index c7d2d39..3fd8436 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "A flexible rule-based file and folder comparison tool and crate i repository = "https://github.com/VolumeGraphics/havocompare" homepage = "https://github.com/VolumeGraphics/havocompare" documentation = "https://docs.rs/havocompare" -version = "0.5.2" +version = "0.5.3" edition = "2021" license = "MIT" authors = ["Volume Graphics GmbH"] diff --git a/config_scheme.json b/config_scheme.json index 23a51f9..3670404 100644 --- a/config_scheme.json +++ b/config_scheme.json @@ -153,13 +153,15 @@ "type": "object", "properties": { "ignore_keys": { - "type": [ - "array", - "null" - ], + "default": [], + "type": "array", "items": { "type": "string" } + }, + "sort_arrays": { + "default": false, + "type": "boolean" } } }, diff --git a/src/lib.rs b/src/lib.rs index 55efb76..15c5063 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -175,8 +175,7 @@ pub fn compare_files( ) -> Difference { let file_name_nominal = nominal.as_ref().to_string_lossy(); let file_name_actual = actual.as_ref().to_string_lossy(); - let _file_span = span!(tracing::Level::INFO, "Processing"); - let _file_span = _file_span.enter(); + let _file_span = span!(tracing::Level::INFO, "Processing").entered(); info!("File: {file_name_nominal} | {file_name_actual}"); @@ -247,8 +246,7 @@ fn process_rule( rule: &Rule, compare_results: &mut Vec, ) -> Result { - let _file_span = span!(tracing::Level::INFO, "Rule"); - let _file_span = _file_span.enter(); + let _file_span = span!(tracing::Level::INFO, "Rule").entered(); info!("Name: {}", rule.name.as_str()); if !nominal.as_ref().is_dir() { error!( diff --git a/src/report/mod.rs b/src/report/mod.rs index e7611bb..ab2e7e2 100644 --- a/src/report/mod.rs +++ b/src/report/mod.rs @@ -584,8 +584,7 @@ pub(crate) fn create_reports( rule_differences: &[RuleDifferences], report_path: impl AsRef, ) -> Result<(), Error> { - let _reporting_span = span!(tracing::Level::INFO, "Reporting"); - let _reporting_span = _reporting_span.enter(); + let _reporting_span = span!(tracing::Level::INFO, "Reporting").entered(); let report_dir = report_path.as_ref(); if report_dir.is_dir() { info!("Delete report folder"); @@ -604,8 +603,7 @@ pub(crate) fn create_json( rule_differences: &[RuleDifferences], report_path: impl AsRef, ) -> Result<(), Error> { - let _reporting_span = span!(tracing::Level::INFO, "JSON"); - let _reporting_span = _reporting_span.enter(); + let _reporting_span = span!(tracing::Level::INFO, "JSON").entered(); let report_dir = report_path.as_ref(); let writer = report_dir.join("report.json"); let writer = fat_io_wrap_std(writer, &File::create)?; @@ -617,8 +615,7 @@ pub(crate) fn create_html( rule_differences: &[RuleDifferences], report_path: impl AsRef, ) -> Result<(), Error> { - let _reporting_span = span!(tracing::Level::INFO, "HTML"); - let _reporting_span = _reporting_span.enter(); + let _reporting_span = span!(tracing::Level::INFO, "HTML").entered(); let report_dir = report_path.as_ref(); let mut html_rule_differences: Vec = Vec::new();