Adjust the indenting again

This commit is contained in:
Josh Dales
2023-03-27 16:52:42 -04:00
parent b1a2f85ed8
commit 2f1dfd1ef0
4 changed files with 32 additions and 32 deletions

View File

@@ -50,30 +50,30 @@ function printPattern(matcher: Minimatch): string {
}
function isAnyMatch(changedFile: string, matchers: Minimatch[]): boolean {
core.debug(` matching patterns against file ${changedFile}`);
core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`);
core.debug(` - ${printPattern(matcher)}`);
if (matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} matched`);
core.debug(` ${printPattern(matcher)} matched`);
return true;
}
}
core.debug(` no patterns matched`);
core.debug(` no patterns matched`);
return false;
}
function isAllMatch(changedFile: string, matchers: Minimatch[]): boolean {
core.debug(` matching patterns against file ${changedFile}`);
core.debug(` matching patterns against file ${changedFile}`);
for (const matcher of matchers) {
core.debug(` - ${printPattern(matcher)}`);
core.debug(` - ${printPattern(matcher)}`);
if (!matcher.match(changedFile)) {
core.debug(` ${printPattern(matcher)} did not match`);
core.debug(` ${printPattern(matcher)} did not match`);
return false;
}
}
core.debug(` all patterns matched`);
core.debug(` all patterns matched`);
return true;
}
@@ -84,12 +84,12 @@ export function checkAnyChangedFiles(
const matchers = globs.map(g => new Minimatch(g));
for (const changedFile of changedFiles) {
if (isAnyMatch(changedFile, matchers)) {
core.debug(` "any" patterns matched against ${changedFile}`);
core.debug(` "any" patterns matched against ${changedFile}`);
return true;
}
}
core.debug(` "any" patterns did not match any files`);
core.debug(` "any" patterns did not match any files`);
return false;
}
@@ -100,11 +100,11 @@ export function checkAllChangedFiles(
const matchers = globs.map(g => new Minimatch(g));
for (const changedFile of changedFiles) {
if (!isAllMatch(changedFile, matchers)) {
core.debug(` "all" patterns did not match against ${changedFile}`);
core.debug(` "all" patterns did not match against ${changedFile}`);
return false;
}
}
core.debug(` "all" patterns matched all files`);
core.debug(` "all" patterns matched all files`);
return true;
}