Skip to content

Commit

Permalink
Change order
Browse files Browse the repository at this point in the history
  • Loading branch information
iObject committed Aug 21, 2024
1 parent 7721a4d commit 27b211d
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/findNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@ function getFilteredScopes(program: Program) {
const hasExclusions = excludePatterns.length > 0;

for (const filteredScope of program.getScopes().filter((scope) => isXmlScope(scope))) {
if (!hasExclusions) {
scopes.push(filteredScope);

Check failure on line 32 in src/findNodes.ts

View workflow job for this annotation

GitHub Actions / create-package

Argument of type 'Scope' is not assignable to parameter of type 'XmlScope'.

Check failure on line 32 in src/findNodes.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest)

Argument of type 'Scope' is not assignable to parameter of type 'XmlScope'.
continue; // Skip further checks since it's explicitly included
}

let isIncluded = includePatterns.some((pattern: string) =>
minimatch.match([filteredScope.name], pattern).length > 0
);
Expand All @@ -37,15 +42,11 @@ function getFilteredScopes(program: Program) {
continue; // Skip further checks since it's explicitly included
}

if (!hasExclusions) {
let isExcluded = excludePatterns.some((pattern: string) =>
minimatch.match([filteredScope.name], pattern).length > 0
);
if (!isExcluded) {
scopes.push(filteredScope);

Check failure on line 49 in src/findNodes.ts

View workflow job for this annotation

GitHub Actions / create-package

Argument of type 'Scope' is not assignable to parameter of type 'XmlScope'.

Check failure on line 49 in src/findNodes.ts

View workflow job for this annotation

GitHub Actions / ci (ubuntu-latest)

Argument of type 'Scope' is not assignable to parameter of type 'XmlScope'.
} else {
let isExcluded = excludePatterns.some((pattern: string) =>
minimatch.match([filteredScope.name], pattern).length > 0
);
if (!isExcluded) {
scopes.push(filteredScope);
}
}
}

Expand Down

0 comments on commit 27b211d

Please sign in to comment.