Skip to content

Commit

Permalink
fix: correct merge
Browse files Browse the repository at this point in the history
  • Loading branch information
a-frantz committed Dec 19, 2024
1 parent 5163e83 commit 7b0b05e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use codespan_reporting::term::termcolor::ColorChoice;
use codespan_reporting::term::termcolor::StandardStream;
use wdl::analysis::AnalysisResult;
use wdl::analysis::Analyzer;
use wdl::analysis::DiagnosticsConfig;
use wdl::analysis::path_to_uri;
use wdl::lint::LintVisitor;
use wdl::ast::Validator;
Expand Down Expand Up @@ -80,17 +81,17 @@ pub async fn analyze(
lint: bool,
) -> anyhow::Result<Vec<AnalysisResult>> {
let rules= wdl::analysis::rules();
let exceptions_clone = exceptions.clone();
let rules = rules.iter().filter_map(|rule| {
if exceptions.iter().any(|e| e == rule.id()) {
None
} else {
Some(rule)
}
});
let rules_config = DiagnosticsConfig::new(rules);

let analyzer = Analyzer::new_with_validator(
rules,
rules_config,
move |bar: ProgressBar, kind, completed, total| async move {
if bar.elapsed() < PROGRESS_BAR_DELAY {
return;
Expand All @@ -108,7 +109,7 @@ pub async fn analyze(

if lint {
let visitor = LintVisitor::new(wdl::lint::rules().into_iter().filter_map(|rule| {
if exceptions_clone.iter().any(|e| e == rule.id()) {
if exceptions.iter().any(|e| e == rule.id()) {
None
} else {
Some(rule)
Expand Down

0 comments on commit 7b0b05e

Please sign in to comment.