Skip to content

Commit

Permalink
Remove private noErrors parameter to main entry point, hardcode "true…
Browse files Browse the repository at this point in the history
…" behavior.
  • Loading branch information
DavidAnson committed Nov 16, 2023
1 parent 53bf1fc commit b09fc7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
9 changes: 1 addition & 8 deletions markdownlint-cli2.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ const enumerateFiles = async (
baseDir,
globPatterns,
dirToDirInfo,
noErrors,
noRequire
) => {
const tasks = [];
Expand All @@ -482,11 +481,9 @@ const enumerateFiles = async (
"cwd": baseDir,
"dot": true,
"expandDirectories": false,
"suppressErrors": true,
fs
};
if (noErrors) {
globbyOptions.suppressErrors = true;
}
// Special-case literal files
const literalFiles = [];
const filteredGlobPatterns = globPatterns.filter(
Expand Down Expand Up @@ -608,7 +605,6 @@ const createDirInfos = async (
globPatterns,
dirToDirInfo,
optionsOverride,
noErrors,
noRequire
) => {
await enumerateFiles(
Expand All @@ -617,7 +613,6 @@ const createDirInfos = async (
baseDir,
globPatterns,
dirToDirInfo,
noErrors,
noRequire
);
await enumerateParents(
Expand Down Expand Up @@ -898,7 +893,6 @@ const main = async (params) => {
optionsOverride,
fileContents,
nonFileContents,
noErrors,
noGlobs,
noRequire,
name
Expand Down Expand Up @@ -989,7 +983,6 @@ const main = async (params) => {
globPatterns,
dirToDirInfo,
optionsOverride,
noErrors,
noRequire
);
// Output linting status
Expand Down
3 changes: 1 addition & 2 deletions test/markdownlint-cli2-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -475,8 +475,7 @@ test("custom fs, extension scenario with exception", (t) => {
"stat": null,
"readdir": null,
"readFile": null
},
"noErrors": true
}
}).
then((exitCode) => {
t.is(exitCode, 0);
Expand Down

0 comments on commit b09fc7c

Please sign in to comment.