Skip to content

Commit

Permalink
Merge pull request #548 from gauge-sh/extract-ignore-logic-from-impor…
Browse files Browse the repository at this point in the history
…t-visitor

Extract ignore logic from import visitor
  • Loading branch information
emdoyle authored Jan 16, 2025
2 parents 3b69404 + 89dd930 commit 5cecbc7
Show file tree
Hide file tree
Showing 4 changed files with 245 additions and 163 deletions.
5 changes: 2 additions & 3 deletions src/commands/check_internal/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ fn process_file(
}
};

project_imports.imports.into_iter().for_each(|import| {
project_imports.active_imports().for_each(|import| {
if let Err(error_info) = check_import(
&import.module_path,
module_tree,
Expand All @@ -108,8 +108,7 @@ fn process_file(
});

project_imports
.directive_ignored_imports
.into_iter()
.directive_ignored_imports()
.for_each(|directive_ignored_import| {
if project_config.rules.unused_ignore_directives != RuleSetting::Off {
let check_result = check_unused_ignore_directive(
Expand Down
2 changes: 1 addition & 1 deletion src/commands/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ fn find_affected_modules(
}

pub fn get_affected_modules(
project_root: &PathBuf,
project_root: &Path,
project_config: &ProjectConfig,
changed_files: Vec<PathBuf>,
module_tree: &ModuleTree,
Expand Down
Loading

0 comments on commit 5cecbc7

Please sign in to comment.