File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ fn is_document_excluded(
5959) -> bool {
6060 if let Some ( exclusion) = match_any_exclusion (
6161 path,
62+ & resolver_settings. project_root ,
6263 & resolver_settings. exclude ,
6364 & resolver_settings. extend_exclude ,
6465 linter_settings. map ( |s| & * s. exclude ) ,
Original file line number Diff line number Diff line change @@ -778,6 +778,7 @@ impl std::fmt::Display for ExclusionKind {
778778/// any of the exclusion criteria.
779779pub fn match_any_exclusion (
780780 path : & Path ,
781+ project_root : & Path ,
781782 exclude : & GlobSet ,
782783 extend_exclude : & GlobSet ,
783784 lint_exclude : Option < & GlobSet > ,
@@ -804,6 +805,11 @@ pub fn match_any_exclusion(
804805 }
805806 }
806807 }
808+ if path == project_root {
809+ // Bail out; we'd end up past the project root on the next iteration
810+ // (excludes etc. are thus "rooted" to the project).
811+ break ;
812+ }
807813 }
808814 None
809815}
You can’t perform that action at this time.
0 commit comments