diff --git a/package.json b/package.json index 0a64b2d4..ddaee4b8 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "build-example": "npm install --no-save --ignore-scripts grunt grunt-cli gulp through2", "example": "cd example && node standalone.js && grunt markdownlint --force && gulp markdownlint", "clone-test-repos": "make-dir test-repos && cd test-repos && git clone https://github.com/eslint/eslint eslint-eslint --depth 1 --no-tags --quiet && git clone https://github.com/mkdocs/mkdocs mkdocs-mkdocs --depth 1 --no-tags --quiet && git clone https://github.com/pi-hole/docs pi-hole-docs --depth 1 --no-tags --quiet", + "clone-test-repos-large": "npm run clone-test-repos && cd test-repos && git clone https://github.com/dotnet/docs dotnet-docs --depth 1 --no-tags --quiet", "lint-test-repos": "node test/markdownlint-test-repos.js", "clean-test-repos": "rimraf test-repos" }, diff --git a/test/markdownlint-test-repos.js b/test/markdownlint-test-repos.js index 50d3bbb9..2149a40f 100644 --- a/test/markdownlint-test-repos.js +++ b/test/markdownlint-test-repos.js @@ -2,6 +2,7 @@ "use strict"; +const { existsSync } = require("fs"); const { join } = require("path"); const { promisify } = require("util"); const globby = require("globby"); @@ -91,3 +92,18 @@ tape("https://github.com/pi-hole/docs", (test) => { const configPath = join(rootDir, ".markdownlint.json"); lintTestRepo(test, globPatterns, configPath); }); + +// Optional repositories (very large) + +const dotnetDocsDir = "./test-repos/dotnet-docs"; +if (existsSync(dotnetDocsDir)) { + tape("https://github.com/dotnet/docs", (test) => { + const rootDir = dotnetDocsDir; + const globPatterns = [ + join(rootDir, "**/*.md"), + "!" + join(rootDir, "samples/**/*.md") + ]; + const configPath = join(rootDir, ".markdownlint.json"); + lintTestRepo(test, globPatterns, configPath); + }); +}