    Checking sarif_rust v0.1.1 (/home/khalid/Data/Buguard/sarif_rust)
error: unused import: `std::cmp::Ordering`
    --> src/utils/query.rs:1070:13
     |
1070 |         use std::cmp::Ordering;
     |             ^^^^^^^^^^^^^^^^^^
     |
     = note: `-D unused-imports` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: unused import: `crate::parser::SarifResult`
 --> src/utils/schema_evolution.rs:6:5
  |
6 | use crate::parser::SarifResult;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

error: unused imports: `Artifact` and `Result as SarifResult`
 --> src/utils/streaming.rs:7:20
  |
7 | use crate::types::{Artifact, Result as SarifResult, Run, SarifLog};
  |                    ^^^^^^^^  ^^^^^^^^^^^^^^^^^^^^^

error: unused imports: `Deserializer` and `StreamDeserializer`
 --> src/utils/streaming.rs:8:18
  |
8 | use serde_json::{Deserializer, StreamDeserializer, Value};
  |                  ^^^^^^^^^^^^  ^^^^^^^^^^^^^^^^^^

error: unused imports: `BufRead`, `SeekFrom`, and `Seek`
  --> src/utils/streaming.rs:10:15
   |
10 | use std::io::{BufRead, BufReader, Read, Seek, SeekFrom};
   |               ^^^^^^^                   ^^^^  ^^^^^^^^

error: unused import: `crate::types::Level`
   --> src/utils/merge_diff.rs:866:9
    |
866 |     use crate::types::Level;
    |         ^^^^^^^^^^^^^^^^^^^
    |
    = note: `-D unused-imports` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(unused_imports)]`

error: unused import: `std::cmp::Ordering`
    --> src/utils/query.rs:1070:13
     |
1070 |         use std::cmp::Ordering;
     |             ^^^^^^^^^^^^^^^^^^

error: variable does not need to be mutable
  --> src/builder/tool_builder.rs:75:28
   |
75 |     pub fn add_simple_rule(mut self, id: impl Into<String>, name: impl Into<String>) -> Self {
   |                            ----^^^^
   |                            |
   |                            help: remove this `mut`
   |
   = note: `-D unused-mut` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_mut)]`

error: unused variable: `validator`
  --> src/parser/validator.rs:15:29
   |
15 |     fn validate_with(&self, validator: &SarifValidator) -> ValidationResult<()> {
   |                             ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_validator`
   |
   = note: `-D unused-variables` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(unused_variables)]`

error: unused variable: `base_id`
   --> src/parser/validator.rs:830:18
    |
830 |             for (base_id, base_uri) in &context.base_uris {
    |                  ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_base_id`

error: unused variable: `warnings`
   --> src/utils/merge_diff.rs:331:9
    |
331 |         warnings: &mut Vec<String>,
    |         ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_warnings`

error: unused variable: `tool_name`
   --> src/utils/merge_diff.rs:441:14
    |
441 |         for (tool_name, mut tool_run_list) in tool_runs {
    |              ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_tool_name`

error: unused variable: `comparison_key`
   --> src/utils/merge_diff.rs:606:26
    |
606 |             if let Some((comparison_key, (comparison_result, comparison_location))) =
    |                          ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_comparison_key`

error: variable does not need to be mutable
   --> src/utils/query.rs:390:13
    |
390 |         let mut ordered_results = self.apply_ordering(filtered_results, query);
    |             ----^^^^^^^^^^^^^^^
    |             |
    |             help: remove this `mut`

error: unused variable: `run`
   --> src/utils/query.rs:996:48
    |
996 |     fn get_rule_metadata(&self, rule_id: &str, run: &Run) -> Option<&ReportingDescriptor> {
    |                                                ^^^ help: if this is intentional, prefix it with an underscore: `_run`

error: variable does not need to be mutable
   --> src/utils/streaming.rs:303:13
    |
303 |         let mut run_iterator = self.parser.parse_runs();
    |             ----^^^^^^^^^^^^
    |             |
    |             help: remove this `mut`

error: methods `should_include_result` and `is_level_included` are never used
   --> src/utils/merge_diff.rs:382:8
    |
229 | impl SarifMerger {
    | ---------------- methods in this implementation
...
382 |     fn should_include_result(&self, result: &SarifResult) -> bool {
    |        ^^^^^^^^^^^^^^^^^^^^^
...
416 |     fn is_level_included(&self, result_level: &Level, min_level: &Level) -> bool {
    |        ^^^^^^^^^^^^^^^^^
    |
    = note: `-D dead-code` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(dead_code)]`

error: fields `monitor`, `result_pool`, `string_interner`, and `computation_cache` are never read
   --> src/utils/performance.rs:117:5
    |
115 | pub struct OptimizedSarifProcessor {
    |            ----------------------- fields in this struct
116 |     /// Performance monitor
117 |     monitor: PerformanceMonitor,
    |     ^^^^^^^
...
120 |     result_pool: Arc<MemoryPool<SarifResult>>,
    |     ^^^^^^^^^^^
...
123 |     string_interner: StringInterner,
    |     ^^^^^^^^^^^^^^^
...
126 |     computation_cache: ComputationCache,
    |     ^^^^^^^^^^^^^^^^^

error: variant `ReadingMetadata` is never constructed
  --> src/utils/streaming.rs:28:5
   |
26 | enum ParserState {
   |      ----------- variant in this enum
27 |     Initial,
28 |     ReadingMetadata,
   |     ^^^^^^^^^^^^^^^
   |
   = note: `ParserState` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis

error: this `if` statement can be collapsed
   --> src/builder/run_builder.rs:282:9
    |
282 | /         if let Some(uri_base_ids) = self.original_uri_base_ids {
283 | |             if !uri_base_ids.is_empty() {
284 | |                 run.original_uri_base_ids = Some(uri_base_ids);
285 | |             }
286 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
    = note: `-D clippy::collapsible-if` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::collapsible_if)]`
help: collapse nested if block
    |
282 ~         if let Some(uri_base_ids) = self.original_uri_base_ids
283 ~             && !uri_base_ids.is_empty() {
284 |                 run.original_uri_base_ids = Some(uri_base_ids);
285 ~             }
    |

error: this function has too many arguments (8/7)
   --> src/builder/sarif_builder.rs:121:5
    |
121 | /     pub fn error_finding(
122 | |         tool_name: impl Into<String>,
123 | |         rule_id: impl Into<String>,
124 | |         message: impl Into<String>,
...   |
129 | |         end_column: i32,
130 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `-D clippy::too-many-arguments` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::too_many_arguments)]`

error: this function has too many arguments (8/7)
   --> src/builder/sarif_builder.rs:147:5
    |
147 | /     pub fn warning_finding(
148 | |         tool_name: impl Into<String>,
149 | |         rule_id: impl Into<String>,
150 | |         message: impl Into<String>,
...   |
155 | |         end_column: i32,
156 | |     ) -> Self {
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

error: this `if` statement can be collapsed
   --> src/parser/json_parser.rs:146:9
    |
146 | /         if let Some(max_size) = self.max_size {
147 | |             if json.len() > max_size {
148 | |                 return Err(SarifError::custom(format!(
149 | |                     "JSON size {} exceeds maximum {}",
...   |
154 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
146 ~         if let Some(max_size) = self.max_size
147 ~             && json.len() > max_size {
148 |                 return Err(SarifError::custom(format!(
...
152 |                 )));
153 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:205:9
    |
205 | /         if let Some(schema) = &sarif.schema {
206 | |             if self.validate_uris {
207 | |                 self.validate_uri(schema)?;
208 | |             }
209 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
205 ~         if let Some(schema) = &sarif.schema
206 ~             && self.validate_uris {
207 |                 self.validate_uri(schema)?;
208 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:369:9
    |
369 | /         if let Some(uri) = &location.uri {
370 | |             if self.validate_uris {
371 | |                 self.validate_uri(uri)?;
372 | |             }
373 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
369 ~         if let Some(uri) = &location.uri
370 ~             && self.validate_uris {
371 |                 self.validate_uri(uri)?;
372 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:376:9
    |
376 | /         if let Some(index) = location.index {
377 | |             if index < 0 {
378 | |                 return Err(ValidationError::invalid_reference(format!(
379 | |                     "negative index: {}",
...   |
383 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
376 ~         if let Some(index) = location.index
377 ~             && index < 0 {
378 |                 return Err(ValidationError::invalid_reference(format!(
...
381 |                 )));
382 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:391:9
    |
391 | /         if let Some(start_line) = region.start_line {
392 | |             if start_line <= 0 {
393 | |                 return Err(ValidationError::inconsistent_data(format!(
394 | |                     "start_line {} must be positive (1-based)",
...   |
398 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
391 ~         if let Some(start_line) = region.start_line
392 ~             && start_line <= 0 {
393 |                 return Err(ValidationError::inconsistent_data(format!(
...
396 |                 )));
397 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:399:9
    |
399 | /         if let Some(end_line) = region.end_line {
400 | |             if end_line <= 0 {
401 | |                 return Err(ValidationError::inconsistent_data(format!(
402 | |                     "end_line {} must be positive (1-based)",
...   |
406 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
399 ~         if let Some(end_line) = region.end_line
400 ~             && end_line <= 0 {
401 |                 return Err(ValidationError::inconsistent_data(format!(
...
404 |                 )));
405 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:409:9
    |
409 | /         if let Some(start_column) = region.start_column {
410 | |             if start_column <= 0 {
411 | |                 return Err(ValidationError::inconsistent_data(format!(
412 | |                     "start_column {} must be positive (1-based)",
...   |
416 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
409 ~         if let Some(start_column) = region.start_column
410 ~             && start_column <= 0 {
411 |                 return Err(ValidationError::inconsistent_data(format!(
...
414 |                 )));
415 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:417:9
    |
417 | /         if let Some(end_column) = region.end_column {
418 | |             if end_column <= 0 {
419 | |                 return Err(ValidationError::inconsistent_data(format!(
420 | |                     "end_column {} must be positive (1-based)",
...   |
424 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
417 ~         if let Some(end_column) = region.end_column
418 ~             && end_column <= 0 {
419 |                 return Err(ValidationError::inconsistent_data(format!(
...
422 |                 )));
423 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:436:13
    |
436 | /             if start_line == end_line {
437 | |                 if let (Some(start_col), Some(end_col)) = (region.start_column, region.end_column) {
438 | |                     if start_col > end_col {
439 | |                         return Err(ValidationError::inconsistent_data(format!(
...   |
445 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
436 ~             if start_line == end_line
437 ~                 && let (Some(start_col), Some(end_col)) = (region.start_column, region.end_column) {
438 |                     if start_col > end_col {
...
443 |                     }
444 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:437:17
    |
437 | /                 if let (Some(start_col), Some(end_col)) = (region.start_column, region.end_column) {
438 | |                     if start_col > end_col {
439 | |                         return Err(ValidationError::inconsistent_data(format!(
440 | |                             "start_column {} > end_column {} on same line",
...   |
444 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
437 ~                 if let (Some(start_col), Some(end_col)) = (region.start_column, region.end_column)
438 ~                     && start_col > end_col {
439 |                         return Err(ValidationError::inconsistent_data(format!(
...
442 |                         )));
443 ~                     }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:491:9
    |
491 | /         if let (Some(char_offset), Some(byte_offset)) = (region.char_offset, region.byte_offset) {
492 | |             if char_offset > byte_offset {
493 | |                 // This could be valid in multi-byte UTF-8, but suspicious
494 | |                 if matches!(self.level, ValidationLevel::Pedantic) {
...   |
501 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
491 ~         if let (Some(char_offset), Some(byte_offset)) = (region.char_offset, region.byte_offset)
492 ~             && char_offset > byte_offset {
493 |                 // This could be valid in multi-byte UTF-8, but suspicious
...
499 |                 }
500 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:504:9
    |
504 | /         if let Some(snippet) = &region.snippet {
505 | |             if let Some(text) = &snippet.text {
506 | |                 if text.is_empty()
507 | |                     && matches!(
...   |
528 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
504 ~         if let Some(snippet) = &region.snippet
505 ~             && let Some(text) = &snippet.text {
506 |                 if text.is_empty()
...
526 |                 }
527 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:566:9
    |
566 | /         if let Some(uri) = &descriptor.help_uri {
567 | |             if self.validate_uris {
568 | |                 self.validate_uri(uri)?;
569 | |             }
570 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
566 ~         if let Some(uri) = &descriptor.help_uri
567 ~             && self.validate_uris {
568 |                 self.validate_uri(uri)?;
569 ~             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:831:17
    |
831 | /                 if let Ok(base_url) = url::Url::parse(base_uri) {
832 | |                     if let Ok(_resolved) = base_url.join(uri) {
833 | |                         return Ok(()); // Successfully resolved
834 | |                     }
835 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
831 ~                 if let Ok(base_url) = url::Url::parse(base_uri)
832 ~                     && let Ok(_resolved) = base_url.join(uri) {
833 |                         return Ok(()); // Successfully resolved
834 ~                     }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:906:25
    |
906 | /                         if let Some(physical_location) = &location.physical_location {
907 | |                             if let Some(artifact_location) = &physical_location.artifact_location {
908 | |                                 self.validate_artifact_location_reference(artifact_location, context,
909 | |                                     &format!("result[{}].locations[{}].physicalLocation.artifactLocation", result_idx, loc_idx))?;
910 | |                             }
911 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
906 ~                         if let Some(physical_location) = &location.physical_location
907 ~                             && let Some(artifact_location) = &physical_location.artifact_location {
908 |                                 self.validate_artifact_location_reference(artifact_location, context,
909 |                                     &format!("result[{}].locations[{}].physicalLocation.artifactLocation", result_idx, loc_idx))?;
910 ~                             }
    |

error: this `if` statement can be collapsed
   --> src/parser/validator.rs:986:17
    |
986 | /                 if let (Some(rule_id), Some(rules)) = (&result.rule_id, &run.tool.driver.rules) {
987 | |                     if !rules.iter().any(|rule| rule.id == *rule_id) {
988 | |                         return Err(ValidationError::invalid_reference(format!(
989 | |                             "result[{}].ruleId '{}' does not exist in tool.driver.rules",
...   |
993 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
986 ~                 if let (Some(rule_id), Some(rules)) = (&result.rule_id, &run.tool.driver.rules)
987 ~                     && !rules.iter().any(|rule| rule.id == *rule_id) {
988 |                         return Err(ValidationError::invalid_reference(format!(
...
991 |                         )));
992 ~                     }
    |

error: this `if` statement can be collapsed
    --> src/parser/validator.rs:1074:33
     |
1074 | / ...                   if let Some(index) = tf_location.index {
1075 | | ...                       if index < 0 {
1076 | | ...                           return Err(ValidationError::invalid_reference(format!(
1077 | | ...                               "result[{}].codeFlows[{}].threadFlows[{}].locations[{}].index {} cannot be negative",
...    |
1082 | | ...                   }
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1074 ~                                 if let Some(index) = tf_location.index
1075 ~                                     && index < 0 {
1076 |                                         return Err(ValidationError::invalid_reference(format!(
 ...
1080 |                                     }
1081 ~                                     // TODO: Validate against run.threadFlowLocations if present
     |

error: this expression creates a reference which is immediately dereferenced by the compiler
  --> src/utils/conversion.rs:96:43
   |
96 |         let message = self.format_message(&result.message.text.as_deref().unwrap_or("No message"));
   |                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `result.message.text.as_deref().unwrap_or("No message")`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-D clippy::needless-borrow` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrow)]`

error: very complex type used. Consider factoring parts into `type` definitions
   --> src/utils/conversion.rs:122:10
    |
122 |       ) -> (
    |  __________^
123 | |         String,
124 | |         Option<i32>,
125 | |         Option<i32>,
...   |
129 | |         Option<i32>,
130 | |     ) {
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `-D clippy::type-complexity` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::type_complexity)]`

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:131:9
    |
131 | /         if let Some(locations) = &result.locations {
132 | |             if let Some(location) = locations.first() {
133 | |                 if let Some(physical_location) = &location.physical_location {
134 | |                     let file = if let Some(artifact_location) = &physical_location.artifact_location
...   |
160 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
131 ~         if let Some(locations) = &result.locations
132 ~             && let Some(location) = locations.first() {
133 |                 if let Some(physical_location) = &location.physical_location {
...
158 |                 }
159 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:132:13
    |
132 | /             if let Some(location) = locations.first() {
133 | |                 if let Some(physical_location) = &location.physical_location {
134 | |                     let file = if let Some(artifact_location) = &physical_location.artifact_location
...   |
159 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
132 ~             if let Some(location) = locations.first()
133 ~                 && let Some(physical_location) = &location.physical_location {
134 |                     let file = if let Some(artifact_location) = &physical_location.artifact_location
...
157 |                     return (file, None, None, None, None, None, None);
158 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:523:9
    |
523 | /         if let Some(locations) = &result.locations {
524 | |             if let Some(location) = locations.first() {
525 | |                 if let Some(physical_location) = &location.physical_location {
526 | |                     if let Some(artifact_location) = &physical_location.artifact_location {
...   |
549 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
523 ~         if let Some(locations) = &result.locations
524 ~             && let Some(location) = locations.first() {
525 |                 if let Some(physical_location) = &location.physical_location {
...
547 |                 }
548 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:524:13
    |
524 | /             if let Some(location) = locations.first() {
525 | |                 if let Some(physical_location) = &location.physical_location {
526 | |                     if let Some(artifact_location) = &physical_location.artifact_location {
527 | |                         if let Some(uri) = &artifact_location.uri {
...   |
548 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
524 ~             if let Some(location) = locations.first()
525 ~                 && let Some(physical_location) = &location.physical_location {
526 |                     if let Some(artifact_location) = &physical_location.artifact_location {
...
546 |                     }
547 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:526:21
    |
526 | /                     if let Some(artifact_location) = &physical_location.artifact_location {
527 | |                         if let Some(uri) = &artifact_location.uri {
528 | |                             json_obj
529 | |                                 .insert("file".to_string(), serde_json::Value::String(uri.clone()));
530 | |                         }
531 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
526 ~                     if let Some(artifact_location) = &physical_location.artifact_location
527 ~                         && let Some(uri) = &artifact_location.uri {
528 |                             json_obj
529 |                                 .insert("file".to_string(), serde_json::Value::String(uri.clone()));
530 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:667:17
    |
667 | /                 if let Some(physical_location) = &location.physical_location {
668 | |                     if let Some(artifact_location) = &physical_location.artifact_location {
669 | |                         if let Some(uri) = &artifact_location.uri {
670 | |                             affected_files.push(serde_json::Value::String(uri.clone()));
...   |
673 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
667 ~                 if let Some(physical_location) = &location.physical_location
668 ~                     && let Some(artifact_location) = &physical_location.artifact_location {
669 |                         if let Some(uri) = &artifact_location.uri {
670 |                             affected_files.push(serde_json::Value::String(uri.clone()));
671 |                         }
672 ~                     }
    |

error: this `if` statement can be collapsed
   --> src/utils/conversion.rs:668:21
    |
668 | /                     if let Some(artifact_location) = &physical_location.artifact_location {
669 | |                         if let Some(uri) = &artifact_location.uri {
670 | |                             affected_files.push(serde_json::Value::String(uri.clone()));
671 | |                         }
672 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
668 ~                     if let Some(artifact_location) = &physical_location.artifact_location
669 ~                         && let Some(uri) = &artifact_location.uri {
670 |                             affected_files.push(serde_json::Value::String(uri.clone()));
671 ~                         }
    |

error: use of `or_insert_with` to construct default value
   --> src/utils/indexing.rs:232:14
    |
232 |             .or_insert_with(Vec::new)
    |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
    = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`

error: this `if` statement can be collapsed
   --> src/utils/indexing.rs:246:17
    |
246 | /                 if let Some(ref location) = artifact.location {
247 | |                     if let Some(ref uri) = location.uri {
248 | |                         self.artifacts
249 | |                             .insert(uri.clone(), (artifact.clone(), artifact_index));
...   |
252 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
246 ~                 if let Some(ref location) = artifact.location
247 ~                     && let Some(ref uri) = location.uri {
248 |                         self.artifacts
249 |                             .insert(uri.clone(), (artifact.clone(), artifact_index));
250 |                         self.stats.artifact_count += 1;
251 ~                     }
    |

error: use of `or_insert_with` to construct default value
   --> src/utils/indexing.rs:295:18
    |
295 |                 .or_insert_with(Vec::new)
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

error: use of `or_insert_with` to construct default value
   --> src/utils/indexing.rs:304:18
    |
304 |                 .or_insert_with(Vec::new)
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

error: this `if` statement can be collapsed
   --> src/utils/indexing.rs:472:9
    |
472 | /         if let Some(ref run_indices) = query.run_indices {
473 | |             if !run_indices.contains(&location.run_index) {
474 | |                 return false;
475 | |             }
476 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
472 ~         if let Some(ref run_indices) = query.run_indices
473 ~             && !run_indices.contains(&location.run_index) {
474 |                 return false;
475 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/indexing.rs:479:9
    |
479 | /         if let Some(has_guid) = query.has_guid {
480 | |             if has_guid != result.guid.is_some() {
481 | |                 return false;
482 | |             }
483 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
479 ~         if let Some(has_guid) = query.has_guid
480 ~             && has_guid != result.guid.is_some() {
481 |                 return false;
482 ~             }
    |

error: field assignment outside of initializer for an instance created with Default::default()
   --> src/utils/indexing.rs:514:9
    |
514 |         query.rule_ids = Some([rule_id.to_string()].into_iter().collect());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `utils::indexing::SarifQuery { rule_ids: Some([rule_id.to_string()].into_iter().collect()), ..Default::default() }` and removing relevant reassignments
   --> src/utils/indexing.rs:513:9
    |
513 |         let mut query = SarifQuery::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default
    = note: `-D clippy::field-reassign-with-default` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::field_reassign_with_default)]`

error: field assignment outside of initializer for an instance created with Default::default()
   --> src/utils/indexing.rs:524:9
    |
524 |         query.artifact_uris = Some([artifact_uri.to_string()].into_iter().collect());
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: consider initializing the variable with `utils::indexing::SarifQuery { artifact_uris: Some([artifact_uri.to_string()].into_iter().collect()), ..Default::default() }` and removing relevant reassignments
   --> src/utils/indexing.rs:523:9
    |
523 |         let mut query = SarifQuery::default();
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#field_reassign_with_default

error: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do
   --> src/utils/merge_diff.rs:331:19
    |
331 |         warnings: &mut Vec<String>,
    |                   ^^^^^^^^^^^^^^^^ help: change this to: `&mut [String]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
    = note: `-D clippy::ptr-arg` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::ptr_arg)]`

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:367:9
    |
367 | /         if let Some(ref include_tools) = self.config.filters.include_tools {
368 | |             if !include_tools.contains(tool_name) {
369 | |                 return false;
370 | |             }
371 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
367 ~         if let Some(ref include_tools) = self.config.filters.include_tools
368 ~             && !include_tools.contains(tool_name) {
369 |                 return false;
370 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:395:9
    |
395 | /         if let Some(ref rule_id) = result.rule_id {
396 | |             if self.config.filters.exclude_rules.contains(rule_id) {
397 | |                 return false;
398 | |             }
399 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
395 ~         if let Some(ref rule_id) = result.rule_id
396 ~             && self.config.filters.exclude_rules.contains(rule_id) {
397 |                 return false;
398 ~             }
    |

error: use of `or_insert_with` to construct default value
   --> src/utils/merge_diff.rs:435:18
    |
435 |                 .or_insert_with(Vec::new)
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:522:21
    |
522 | /                     if let Some(ref artifact_location) = physical_location.artifact_location {
523 | |                         if let Some(ref uri) = artifact_location.uri {
524 | |                             parts.push(uri.clone());
525 | |                         }
526 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
522 ~                     if let Some(ref artifact_location) = physical_location.artifact_location
523 ~                         && let Some(ref uri) = artifact_location.uri {
524 |                             parts.push(uri.clone());
525 ~                         }
    |

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/utils/merge_diff.rs:578:50
    |
578 |             match self.find_matching_result(key, &result, &baseline_results) {
    |                                                  ^^^^^^^ help: change this to: `result`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/utils/merge_diff.rs:592:50
    |
592 |             match self.find_matching_result(key, &result, &comparison_results) {
    |                                                  ^^^^^^^ help: change this to: `result`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:684:33
    |
684 | / ...                   if let Some(other_fp_value) = other_fingerprints.get(fp_key) {
685 | | ...                       if fp_value == other_fp_value {
686 | | ...                           return Some((
687 | | ...                               other_key.clone(),
...   |
691 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
684 ~                                 if let Some(other_fp_value) = other_fingerprints.get(fp_key)
685 ~                                     && fp_value == other_fp_value {
686 |                                         return Some((
...
689 |                                         ));
690 ~                                     }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:709:9
    |
709 | /         if let Some(ref locations) = result.locations {
710 | |             if let Some(location) = locations.first() {
711 | |                 if let Some(ref physical_location) = location.physical_location {
712 | |                     if let Some(ref artifact_location) = physical_location.artifact_location {
...   |
726 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
709 ~         if let Some(ref locations) = result.locations
710 ~             && let Some(location) = locations.first() {
711 |                 if let Some(ref physical_location) = location.physical_location {
...
724 |                 }
725 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:710:13
    |
710 | /             if let Some(location) = locations.first() {
711 | |                 if let Some(ref physical_location) = location.physical_location {
712 | |                     if let Some(ref artifact_location) = physical_location.artifact_location {
713 | |                         if let Some(ref uri) = artifact_location.uri {
...   |
725 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
710 ~             if let Some(location) = locations.first()
711 ~                 && let Some(ref physical_location) = location.physical_location {
712 |                     if let Some(ref artifact_location) = physical_location.artifact_location {
...
723 |                     }
724 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:712:21
    |
712 | /                     if let Some(ref artifact_location) = physical_location.artifact_location {
713 | |                         if let Some(ref uri) = artifact_location.uri {
714 | |                             parts.push(uri.clone());
715 | |                         }
716 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
712 ~                     if let Some(ref artifact_location) = physical_location.artifact_location
713 ~                         && let Some(ref uri) = artifact_location.uri {
714 |                             parts.push(uri.clone());
715 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:755:9
    |
755 | /         if !self.config.ignore_message_changes {
756 | |             if baseline.message.text != comparison.message.text {
757 | |                 changes.push(ResultChange::MessageChanged {
758 | |                     old: baseline.message.text.clone().unwrap_or_default(),
...   |
762 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
755 ~         if !self.config.ignore_message_changes
756 ~             && baseline.message.text != comparison.message.text {
757 |                 changes.push(ResultChange::MessageChanged {
...
760 |                 });
761 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:797:9
    |
797 | /         if let Some(ref locations) = result.locations {
798 | |             if let Some(location) = locations.first() {
799 | |                 if let Some(ref physical_location) = location.physical_location {
800 | |                     let mut parts = Vec::new();
...   |
819 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
797 ~         if let Some(ref locations) = result.locations
798 ~             && let Some(location) = locations.first() {
799 |                 if let Some(ref physical_location) = location.physical_location {
...
817 |                 }
818 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:798:13
    |
798 | /             if let Some(location) = locations.first() {
799 | |                 if let Some(ref physical_location) = location.physical_location {
800 | |                     let mut parts = Vec::new();
...   |
818 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
798 ~             if let Some(location) = locations.first()
799 ~                 && let Some(ref physical_location) = location.physical_location {
800 |                     let mut parts = Vec::new();
...
816 |                     return parts.join(":");
817 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/merge_diff.rs:802:21
    |
802 | /                     if let Some(ref artifact_location) = physical_location.artifact_location {
803 | |                         if let Some(ref uri) = artifact_location.uri {
804 | |                             parts.push(uri.clone());
805 | |                         }
806 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
802 ~                     if let Some(ref artifact_location) = physical_location.artifact_location
803 ~                         && let Some(ref uri) = artifact_location.uri {
804 |                             parts.push(uri.clone());
805 ~                         }
    |

error: use of `or_insert_with` to construct default value
   --> src/utils/performance.rs:304:18
    |
304 |                 .or_insert_with(Vec::new)
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

error: you should consider adding a `Default` implementation for `StringInterner`
   --> src/utils/performance.rs:500:5
    |
500 | /     pub fn new() -> Self {
501 | |         Self {
502 | |             strings: HashMap::new(),
503 | |             stats: InternerStats::default(),
504 | |         }
505 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
    = note: `-D clippy::new-without-default` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::new_without_default)]`
help: try adding this
    |
498 + impl Default for StringInterner {
499 +     fn default() -> Self {
500 +         Self::new()
501 +     }
502 + }
    |

error: you should consider adding a `Default` implementation for `ComputationCache`
   --> src/utils/performance.rs:541:5
    |
541 | /     pub fn new() -> Self {
542 | |         Self {
543 | |             fingerprint_cache: HashMap::new(),
544 | |             path_cache: HashMap::new(),
...   |
548 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
    |
539 + impl Default for ComputationCache {
540 +     fn default() -> Self {
541 +         Self::new()
542 +     }
543 + }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:438:29
    |
438 | / ...                   if let Some(run) = self.log.runs.get(run_index) {
439 | | ...                       if let Some(ref results) = run.results {
440 | | ...                           for (result_index, result) in results.iter().enumerate() {
441 | | ...                               let location = ResultLocation {
...   |
451 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
438 ~                             if let Some(run) = self.log.runs.get(run_index)
439 ~                                 && let Some(ref results) = run.results {
440 |                                     for (result_index, result) in results.iter().enumerate() {
...
449 |                                     }
450 ~                                 }
    |

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/utils/query.rs:519:39
    |
519 |         if !self.matches_tool_filters(&run, &query.tool_filters) {
    |                                       ^^^^ help: change this to: `run`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/utils/query.rs:524:47
    |
524 |         if !self.matches_rule_filters(result, &run, &query.rule_filters)? {
    |                                               ^^^^ help: change this to: `run`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this expression creates a reference which is immediately dereferenced by the compiler
   --> src/utils/query.rs:539:47
    |
539 |         if !self.matches_text_filters(result, &run, &query.text_filters)? {
    |                                               ^^^^ help: change this to: `run`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this `if` statement can be collapsed
   --> src/utils/query.rs:551:9
    |
551 | /         if let Some(ref include_tools) = filters.include_tools {
552 | |             if !include_tools.contains(tool_name) {
553 | |                 return false;
554 | |             }
555 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
551 ~         if let Some(ref include_tools) = filters.include_tools
552 ~             && !include_tools.contains(tool_name) {
553 |                 return false;
554 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:603:13
    |
603 | /             if let Some(ref include_rules) = filters.include_rules {
604 | |                 if !include_rules.contains(rule_id) {
605 | |                     return Ok(false);
606 | |                 }
607 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
603 ~             if let Some(ref include_rules) = filters.include_rules
604 ~                 && !include_rules.contains(rule_id) {
605 |                     return Ok(false);
606 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:619:21
    |
619 | /                     if let Some(ref props) = rule.properties {
620 | |                         if let Some(category) = props.get("category") {
621 | |                             if let Some(category_str) = category.as_str() {
622 | |                                 if !categories.contains(category_str) {
...   |
627 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
619 ~                     if let Some(ref props) = rule.properties
620 ~                         && let Some(category) = props.get("category") {
621 |                             if let Some(category_str) = category.as_str() {
...
625 |                             }
626 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:620:25
    |
620 | /                         if let Some(category) = props.get("category") {
621 | |                             if let Some(category_str) = category.as_str() {
622 | |                                 if !categories.contains(category_str) {
623 | |                                     return Ok(false);
...   |
626 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
620 ~                         if let Some(category) = props.get("category")
621 ~                             && let Some(category_str) = category.as_str() {
622 |                                 if !categories.contains(category_str) {
623 |                                     return Ok(false);
624 |                                 }
625 ~                             }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:621:29
    |
621 | / ...                   if let Some(category_str) = category.as_str() {
622 | | ...                       if !categories.contains(category_str) {
623 | | ...                           return Ok(false);
624 | | ...                       }
625 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
621 ~                             if let Some(category_str) = category.as_str()
622 ~                                 && !categories.contains(category_str) {
623 |                                     return Ok(false);
624 ~                                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:636:21
    |
636 | /                     if let Some(ref rule_tags) = rule.properties {
637 | |                         if let Some(tag_array) = rule_tags.get("tags") {
638 | |                             if let Some(tag_vec) = tag_array.as_array() {
639 | |                                 let rule_tag_strings: HashSet<String> = tag_vec
...   |
648 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
636 ~                     if let Some(ref rule_tags) = rule.properties
637 ~                         && let Some(tag_array) = rule_tags.get("tags") {
638 |                             if let Some(tag_vec) = tag_array.as_array() {
...
646 |                             }
647 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:637:25
    |
637 | /                         if let Some(tag_array) = rule_tags.get("tags") {
638 | |                             if let Some(tag_vec) = tag_array.as_array() {
639 | |                                 let rule_tag_strings: HashSet<String> = tag_vec
640 | |                                     .iter()
...   |
647 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
637 ~                         if let Some(tag_array) = rule_tags.get("tags")
638 ~                             && let Some(tag_vec) = tag_array.as_array() {
639 |                                 let rule_tag_strings: HashSet<String> = tag_vec
...
645 |                                 }
646 ~                             }
    |

error: this pattern creates a reference to a reference
   --> src/utils/query.rs:618:29
    |
618 |                 if let Some(ref rule) = rule_metadata {
    |                             ^^^^^^^^ help: try: `rule`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this pattern creates a reference to a reference
   --> src/utils/query.rs:635:29
    |
635 |                 if let Some(ref rule) = rule_metadata {
    |                             ^^^^^^^^ help: try: `rule`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

error: this `if` statement can be collapsed
   --> src/utils/query.rs:683:9
    |
683 | /         if let Some(ref kinds) = filters.kinds {
684 | |             if let Some(ref kind) = result.kind {
685 | |                 if !kinds.contains(&kind.to_string()) {
686 | |                     return false;
...   |
689 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
683 ~         if let Some(ref kinds) = filters.kinds
684 ~             && let Some(ref kind) = result.kind {
685 |                 if !kinds.contains(&kind.to_string()) {
686 |                     return false;
687 |                 }
688 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:684:13
    |
684 | /             if let Some(ref kind) = result.kind {
685 | |                 if !kinds.contains(&kind.to_string()) {
686 | |                     return false;
687 | |                 }
688 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
684 ~             if let Some(ref kind) = result.kind
685 ~                 && !kinds.contains(&kind.to_string()) {
686 |                     return false;
687 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:735:21
    |
735 | /                     if let Some(ref artifact_location) = physical_location.artifact_location {
736 | |                         if let Some(ref uri) = artifact_location.uri {
737 | |                             // Include patterns
738 | |                             if !filters.file_patterns.is_empty() {
...   |
782 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
735 ~                     if let Some(ref artifact_location) = physical_location.artifact_location
736 ~                         && let Some(ref uri) = artifact_location.uri {
737 |                             // Include patterns
...
780 |                             return Ok(true);
781 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:758:29
    |
758 | / ...                   if !filters.line_ranges.is_empty() {
759 | | ...                       if let Some(ref region) = physical_location.region {
760 | | ...                           if let Some(start_line) = region.start_line {
761 | | ...                               let matches_line_range =
...   |
778 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
758 ~                             if !filters.line_ranges.is_empty()
759 ~                                 && let Some(ref region) = physical_location.region {
760 |                                     if let Some(start_line) = region.start_line {
...
776 |                                     }
777 ~                                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:759:33
    |
759 | / ...                   if let Some(ref region) = physical_location.region {
760 | | ...                       if let Some(start_line) = region.start_line {
761 | | ...                           let matches_line_range =
762 | | ...                               filters.line_ranges.iter().any(|range| {
...   |
777 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
759 ~                                 if let Some(ref region) = physical_location.region
760 ~                                     && let Some(start_line) = region.start_line {
761 |                                         let matches_line_range =
...
775 |                                         }
776 ~                                     }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:763:49
    |
763 | / ...                   if let Some(ref file_pattern) = range.file_pattern {
764 | | ...                       if !self.matches_glob_pattern(uri, file_pattern)
765 | | ...                       {
766 | | ...                           return false;
767 | | ...                       }
768 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
763 ~                                                 if let Some(ref file_pattern) = range.file_pattern
764 ~                                                     && !self.matches_glob_pattern(uri, file_pattern)
765 |                                                     {
766 |                                                         return false;
767 ~                                                     }
    |

error: this `map_or` can be simplified
   --> src/utils/query.rs:771:56
    |
771 | ...                   && range.end.map_or(true, |end| line <= end)
    |                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
    = note: `-D clippy::unnecessary-map-or` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::unnecessary_map_or)]`
help: use is_none_or instead
    |
771 -                                                     && range.end.map_or(true, |end| line <= end)
771 +                                                     && range.end.is_none_or(|end| line <= end)
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:789:29
    |
789 | / ...                   if let Some(ref name) = logical_location.name {
790 | | ...                       if filter_logical_locations.contains(name) {
791 | | ...                           return Ok(true);
792 | | ...                       }
793 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
789 ~                             if let Some(ref name) = logical_location.name
790 ~                                 && filter_logical_locations.contains(name) {
791 |                                     return Ok(true);
792 ~                                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:794:29
    |
794 | / ...                   if let Some(ref fully_qualified_name) =
795 | | ...                       logical_location.fully_qualified_name
796 | | ...                   {
797 | | ...                       if filter_logical_locations.contains(fully_qualified_name) {
...   |
800 | | ...                   }
    | |_______________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
795 ~                                 logical_location.fully_qualified_name
796 ~                                 && filter_logical_locations.contains(fully_qualified_name) {
797 |                                     return Ok(true);
798 ~                                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:961:21
    |
961 | /                     if let Some(ref phys_loc) = loc.physical_location {
962 | |                         if let Some(ref artifact_loc) = phys_loc.artifact_location {
963 | |                             if let Some(ref uri) = artifact_loc.uri {
964 | |                                 *file_dist.entry(uri.clone()).or_insert(0) += 1;
...   |
968 | |                     }
    | |_____________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
961 ~                     if let Some(ref phys_loc) = loc.physical_location
962 ~                         && let Some(ref artifact_loc) = phys_loc.artifact_location {
963 |                             if let Some(ref uri) = artifact_loc.uri {
...
966 |                             }
967 ~                         }
    |

error: this `if` statement can be collapsed
   --> src/utils/query.rs:962:25
    |
962 | /                         if let Some(ref artifact_loc) = phys_loc.artifact_location {
963 | |                             if let Some(ref uri) = artifact_loc.uri {
964 | |                                 *file_dist.entry(uri.clone()).or_insert(0) += 1;
965 | |                                 unique_files.insert(uri.clone());
966 | |                             }
967 | |                         }
    | |_________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
962 ~                         if let Some(ref artifact_loc) = phys_loc.artifact_location
963 ~                             && let Some(ref uri) = artifact_loc.uri {
964 |                                 *file_dist.entry(uri.clone()).or_insert(0) += 1;
965 |                                 unique_files.insert(uri.clone());
966 ~                             }
    |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1129:17
     |
1129 | /                 if let Some(ref rule_id) = result.rule_id {
1130 | |                     if let Some(rule) = self.get_rule_metadata(rule_id, run) {
1131 | |                         if let Some(ref props) = rule.properties {
1132 | |                             if let Some(category) = props.get("category") {
...    |
1139 | |                 }
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1129 ~                 if let Some(ref rule_id) = result.rule_id
1130 ~                     && let Some(rule) = self.get_rule_metadata(rule_id, run) {
1131 |                         if let Some(ref props) = rule.properties {
 ...
1137 |                         }
1138 ~                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1130:21
     |
1130 | /                     if let Some(rule) = self.get_rule_metadata(rule_id, run) {
1131 | |                         if let Some(ref props) = rule.properties {
1132 | |                             if let Some(category) = props.get("category") {
1133 | |                                 if let Some(cat_str) = category.as_str() {
...    |
1138 | |                     }
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1130 ~                     if let Some(rule) = self.get_rule_metadata(rule_id, run)
1131 ~                         && let Some(ref props) = rule.properties {
1132 |                             if let Some(category) = props.get("category") {
 ...
1136 |                             }
1137 ~                         }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1131:25
     |
1131 | /                         if let Some(ref props) = rule.properties {
1132 | |                             if let Some(category) = props.get("category") {
1133 | |                                 if let Some(cat_str) = category.as_str() {
1134 | |                                     return cat_str.to_string();
...    |
1137 | |                         }
     | |_________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1131 ~                         if let Some(ref props) = rule.properties
1132 ~                             && let Some(category) = props.get("category") {
1133 |                                 if let Some(cat_str) = category.as_str() {
1134 |                                     return cat_str.to_string();
1135 |                                 }
1136 ~                             }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1132:29
     |
1132 | / ...                   if let Some(category) = props.get("category") {
1133 | | ...                       if let Some(cat_str) = category.as_str() {
1134 | | ...                           return cat_str.to_string();
1135 | | ...                       }
1136 | | ...                   }
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1132 ~                             if let Some(category) = props.get("category")
1133 ~                                 && let Some(cat_str) = category.as_str() {
1134 |                                     return cat_str.to_string();
1135 ~                                 }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1143:17
     |
1143 | /                 if let Some(ref rule_id) = result.rule_id {
1144 | |                     if let Some(rule) = self.get_rule_metadata(rule_id, run) {
1145 | |                         if let Some(ref props) = rule.properties {
1146 | |                             if let Some(tags) = props.get("tags") {
...    |
1157 | |                 }
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1143 ~                 if let Some(ref rule_id) = result.rule_id
1144 ~                     && let Some(rule) = self.get_rule_metadata(rule_id, run) {
1145 |                         if let Some(ref props) = rule.properties {
 ...
1155 |                         }
1156 ~                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1144:21
     |
1144 | /                     if let Some(rule) = self.get_rule_metadata(rule_id, run) {
1145 | |                         if let Some(ref props) = rule.properties {
1146 | |                             if let Some(tags) = props.get("tags") {
1147 | |                                 if let Some(tag_array) = tags.as_array() {
...    |
1156 | |                     }
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1144 ~                     if let Some(rule) = self.get_rule_metadata(rule_id, run)
1145 ~                         && let Some(ref props) = rule.properties {
1146 |                             if let Some(tags) = props.get("tags") {
 ...
1154 |                             }
1155 ~                         }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1145:25
     |
1145 | /                         if let Some(ref props) = rule.properties {
1146 | |                             if let Some(tags) = props.get("tags") {
1147 | |                                 if let Some(tag_array) = tags.as_array() {
1148 | |                                     if let Some(first_tag) = tag_array.first() {
...    |
1155 | |                         }
     | |_________________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1145 ~                         if let Some(ref props) = rule.properties
1146 ~                             && let Some(tags) = props.get("tags") {
1147 |                                 if let Some(tag_array) = tags.as_array() {
 ...
1153 |                                 }
1154 ~                             }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1146:29
     |
1146 | / ...                   if let Some(tags) = props.get("tags") {
1147 | | ...                       if let Some(tag_array) = tags.as_array() {
1148 | | ...                           if let Some(first_tag) = tag_array.first() {
1149 | | ...                               if let Some(tag_str) = first_tag.as_str() {
...    |
1154 | | ...                   }
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1146 ~                             if let Some(tags) = props.get("tags")
1147 ~                                 && let Some(tag_array) = tags.as_array() {
1148 |                                     if let Some(first_tag) = tag_array.first() {
 ...
1152 |                                     }
1153 ~                                 }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1147:33
     |
1147 | / ...                   if let Some(tag_array) = tags.as_array() {
1148 | | ...                       if let Some(first_tag) = tag_array.first() {
1149 | | ...                           if let Some(tag_str) = first_tag.as_str() {
1150 | | ...                               return tag_str.to_string();
...    |
1153 | | ...                   }
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1147 ~                                 if let Some(tag_array) = tags.as_array()
1148 ~                                     && let Some(first_tag) = tag_array.first() {
1149 |                                         if let Some(tag_str) = first_tag.as_str() {
1150 |                                             return tag_str.to_string();
1151 |                                         }
1152 ~                                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1148:37
     |
1148 | / ...                   if let Some(first_tag) = tag_array.first() {
1149 | | ...                       if let Some(tag_str) = first_tag.as_str() {
1150 | | ...                           return tag_str.to_string();
1151 | | ...                       }
1152 | | ...                   }
     | |_______________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1148 ~                                     if let Some(first_tag) = tag_array.first()
1149 ~                                         && let Some(tag_str) = first_tag.as_str() {
1150 |                                             return tag_str.to_string();
1151 ~                                         }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1166:17
     |
1166 | /                 if let Some(ref physical_location) = location.physical_location {
1167 | |                     if let Some(ref artifact_location) = physical_location.artifact_location {
1168 | |                         if let Some(ref uri) = artifact_location.uri {
1169 | |                             return uri.clone();
...    |
1172 | |                 }
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1166 ~                 if let Some(ref physical_location) = location.physical_location
1167 ~                     && let Some(ref artifact_location) = physical_location.artifact_location {
1168 |                         if let Some(ref uri) = artifact_location.uri {
1169 |                             return uri.clone();
1170 |                         }
1171 ~                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1167:21
     |
1167 | /                     if let Some(ref artifact_location) = physical_location.artifact_location {
1168 | |                         if let Some(ref uri) = artifact_location.uri {
1169 | |                             return uri.clone();
1170 | |                         }
1171 | |                     }
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1167 ~                     if let Some(ref artifact_location) = physical_location.artifact_location
1168 ~                         && let Some(ref uri) = artifact_location.uri {
1169 |                             return uri.clone();
1170 ~                         }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1181:17
     |
1181 | /                 if let Some(ref physical_location) = location.physical_location {
1182 | |                     if let Some(ref region) = physical_location.region {
1183 | |                         if let Some(line) = region.start_line {
1184 | |                             return line;
...    |
1187 | |                 }
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1181 ~                 if let Some(ref physical_location) = location.physical_location
1182 ~                     && let Some(ref region) = physical_location.region {
1183 |                         if let Some(line) = region.start_line {
1184 |                             return line;
1185 |                         }
1186 ~                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1182:21
     |
1182 | /                     if let Some(ref region) = physical_location.region {
1183 | |                         if let Some(line) = region.start_line {
1184 | |                             return line;
1185 | |                         }
1186 | |                     }
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1182 ~                     if let Some(ref region) = physical_location.region
1183 ~                         && let Some(line) = region.start_line {
1184 |                             return line;
1185 ~                         }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1196:17
     |
1196 | /                 if let Some(ref physical_location) = location.physical_location {
1197 | |                     if let Some(ref region) = physical_location.region {
1198 | |                         if let Some(column) = region.start_column {
1199 | |                             return column;
...    |
1202 | |                 }
     | |_________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1196 ~                 if let Some(ref physical_location) = location.physical_location
1197 ~                     && let Some(ref region) = physical_location.region {
1198 |                         if let Some(column) = region.start_column {
1199 |                             return column;
1200 |                         }
1201 ~                     }
     |

error: this `if` statement can be collapsed
    --> src/utils/query.rs:1197:21
     |
1197 | /                     if let Some(ref region) = physical_location.region {
1198 | |                         if let Some(column) = region.start_column {
1199 | |                             return column;
1200 | |                         }
1201 | |                     }
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
     |
1197 ~                     if let Some(ref region) = physical_location.region
1198 ~                         && let Some(column) = region.start_column {
1199 |                             return column;
1200 ~                         }
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1228:1
     |
1228 | / impl Default for SarifQuery {
1229 | |     fn default() -> Self {
1230 | |         Self {
1231 | |             tool_filters: ToolFilters::default(),
...    |
1241 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
     = note: `-D clippy::derivable-impls` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::derivable_impls)]`
help: replace the manual implementation with a derive attribute
     |
15   + #[derive(Default)]
16   ~ pub struct SarifQuery {
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1243:1
     |
1243 | / impl Default for ToolFilters {
1244 | |     fn default() -> Self {
1245 | |         Self {
1246 | |             include_tools: None,
...    |
1252 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
     |
43   + #[derive(Default)]
44   ~ pub struct ToolFilters {
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1254:1
     |
1254 | / impl Default for RuleFilters {
1255 | |     fn default() -> Self {
1256 | |         Self {
1257 | |             include_rules: None,
...    |
1264 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
     |
59   + #[derive(Default)]
60   ~ pub struct RuleFilters {
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1266:1
     |
1266 | / impl Default for ResultFilters {
1267 | |     fn default() -> Self {
1268 | |         Self {
1269 | |             levels: None,
...    |
1277 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
     |
78   + #[derive(Default)]
79   ~ pub struct ResultFilters {
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1279:1
     |
1279 | / impl Default for LocationFilters {
1280 | |     fn default() -> Self {
1281 | |         Self {
1282 | |             file_patterns: Vec::new(),
...    |
1289 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
     |
100  + #[derive(Default)]
101  ~ pub struct LocationFilters {
     |

error: this `impl` can be derived
    --> src/utils/query.rs:1291:1
     |
1291 | / impl Default for TextFilters {
1292 | |     fn default() -> Self {
1293 | |         Self {
1294 | |             message_text: None,
...    |
1300 | | }
     | |_^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
help: replace the manual implementation with a derive attribute
     |
132  + #[derive(Default)]
133  ~ pub struct TextFilters {
     |

error: method `default` can be confused for the standard trait method `std::default::Default::default`
   --> src/utils/schema_evolution.rs:172:5
    |
172 | /     pub fn default() -> Self {
173 | |         Self::new(SchemaEvolutionConfig::default())
174 | |     }
    | |_____^
    |
    = help: consider implementing the trait `std::default::Default` or choosing a less ambiguous method name
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait
    = note: `-D clippy::should-implement-trait` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::should_implement_trait)]`

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:180:13
    |
180 | /             if let Some(version_val) = obj.get("version") {
181 | |                 if let Some(version_str) = version_val.as_str() {
182 | |                     return SchemaVersion::from_string(version_str);
183 | |                 }
184 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
180 ~             if let Some(version_val) = obj.get("version")
181 ~                 && let Some(version_str) = version_val.as_str() {
182 |                     return SchemaVersion::from_string(version_str);
183 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:187:13
    |
187 | /             if let Some(schema_val) = obj.get("$schema") {
188 | |                 if let Some(schema_str) = schema_val.as_str() {
189 | |                     return self.detect_version_from_schema_uri(schema_str);
190 | |                 }
191 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
187 ~             if let Some(schema_val) = obj.get("$schema")
188 ~                 && let Some(schema_str) = schema_val.as_str() {
189 |                     return self.detect_version_from_schema_uri(schema_str);
190 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:329:9
    |
329 | /         if let Some(runs) = obj.get("runs") {
330 | |             if let Some(runs_array) = runs.as_array() {
331 | |                 if let Some(first_run) = runs_array.first() {
332 | |                     if let Some(run_obj) = first_run.as_object() {
...   |
342 | |         }
    | |_________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
329 ~         if let Some(runs) = obj.get("runs")
330 ~             && let Some(runs_array) = runs.as_array() {
331 |                 if let Some(first_run) = runs_array.first() {
...
340 |                 }
341 ~             }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:330:13
    |
330 | /             if let Some(runs_array) = runs.as_array() {
331 | |                 if let Some(first_run) = runs_array.first() {
332 | |                     if let Some(run_obj) = first_run.as_object() {
...   |
341 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
330 ~             if let Some(runs_array) = runs.as_array()
331 ~                 && let Some(first_run) = runs_array.first() {
332 |                     if let Some(run_obj) = first_run.as_object() {
...
339 |                     }
340 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:331:17
    |
331 | /                 if let Some(first_run) = runs_array.first() {
332 | |                     if let Some(run_obj) = first_run.as_object() {
333 | |                         // V2.0.0+ has 'tool' instead of 'toolInfo'
334 | |                         if run_obj.contains_key("tool") {
...   |
340 | |                 }
    | |_________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
331 ~                 if let Some(first_run) = runs_array.first()
332 ~                     && let Some(run_obj) = first_run.as_object() {
333 |                         // V2.0.0+ has 'tool' instead of 'toolInfo'
...
338 |                         }
339 ~                     }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:384:13
    |
384 | /             if let Some(runs) = obj.get_mut("runs") {
385 | |                 if let Some(runs_array) = runs.as_array_mut() {
386 | |                     for run in runs_array {
387 | |                         self.migrate_run_v1_to_v2(run, &mut warnings)?;
...   |
390 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
384 ~             if let Some(runs) = obj.get_mut("runs")
385 ~                 && let Some(runs_array) = runs.as_array_mut() {
386 |                     for run in runs_array {
387 |                         self.migrate_run_v1_to_v2(run, &mut warnings)?;
388 |                     }
389 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:420:13
    |
420 | /             if let Some(results) = run_obj.get_mut("results") {
421 | |                 if let Some(results_array) = results.as_array_mut() {
422 | |                     for result in results_array {
423 | |                         self.migrate_result_v1_to_v2(result, warnings)?;
...   |
426 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
420 ~             if let Some(results) = run_obj.get_mut("results")
421 ~                 && let Some(results_array) = results.as_array_mut() {
422 |                     for result in results_array {
423 |                         self.migrate_result_v1_to_v2(result, warnings)?;
424 |                     }
425 ~                 }
    |

error: this `if` statement can be collapsed
   --> src/utils/schema_evolution.rs:439:13
    |
439 | /             if let Some(locations) = result_obj.get_mut("locations") {
440 | |                 if let Some(locations_array) = locations.as_array_mut() {
441 | |                     for location in locations_array {
442 | |                         self.migrate_location_v1_to_v2(location, warnings)?;
...   |
445 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
439 ~             if let Some(locations) = result_obj.get_mut("locations")
440 ~                 && let Some(locations_array) = locations.as_array_mut() {
441 |                     for location in locations_array {
442 |                         self.migrate_location_v1_to_v2(location, warnings)?;
443 |                     }
444 ~                 }
    |

error: you are using an explicit closure for cloning elements
   --> src/utils/streaming.rs:137:46
    |
137 |               let inline_external_properties = obj
    |  ______________________________________________^
138 | |                 .get("inlineExternalProperties")
139 | |                 .and_then(|v| v.as_array())
140 | |                 .map(|arr| arr.clone());
    | |_______________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone
    = note: `-D clippy::map-clone` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::map_clone)]`
help: consider calling the dedicated `cloned` method
    |
137 ~             let inline_external_properties = obj
138 +                 .get("inlineExternalProperties")
139 ~                 .and_then(|v| v.as_array()).cloned();
    |

error: this `if` statement can be collapsed
   --> src/utils/streaming.rs:149:13
    |
149 | /             if let Some(runs_value) = obj.get("runs") {
150 | |                 if let Some(runs_array) = runs_value.as_array() {
151 | |                     for run_value in runs_array {
152 | |                         match serde_json::from_value::<Run>(run_value.clone()) {
...   |
161 | |             }
    | |_____________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
help: collapse nested if block
    |
149 ~             if let Some(runs_value) = obj.get("runs")
150 ~                 && let Some(runs_array) = runs_value.as_array() {
151 |                     for run_value in runs_array {
...
159 |                     }
160 ~                 }
    |

error: could not compile `sarif_rust` (lib) due to 129 previous errors
warning: build failed, waiting for other jobs to finish...
error: redundant closure
    --> src/utils/performance.rs:1029:40
     |
1029 |         let mut pool = MemoryPool::new(|| String::new(), 5);
     |                                        ^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `String::new`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
     = note: `-D clippy::redundant-closure` implied by `-D warnings`
     = help: to override `-D warnings` add `#[allow(clippy::redundant_closure)]`

error: could not compile `sarif_rust` (lib test) due to 131 previous errors
