mirror of
https://github.com/DavidAnson/markdownlint.git
synced 2025-12-17 06:20:12 +01:00
Add clone-test-repos-large script for cloning very large repositories (not part of push/pull_request trigger).
This commit is contained in:
parent
2141566b47
commit
ebdf0ddf28
2 changed files with 17 additions and 0 deletions
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue