We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cspell on windows attempts to check test\restDocs, need to avoid that.
test\restDocs
Probably use this script (may need to adapt it):
import path, { dirname } from "path"; import { readdirSync, statSync } from "fs"; import simpleGit from "simple-git"; import { fileURLToPath } from "url"; import { spawn } from "child_process"; const __dirname = dirname(fileURLToPath(import.meta.url)); const git = simpleGit(); const files: string[] = []; async function throughDirectory(directory: string) { for (const file of readdirSync(directory)) { const absolutePath = path.join(directory, file); await new Promise<void>((resolve) => { // eslint-disable-next-line @typescript-eslint/no-floating-promises git.checkIgnore(absolutePath, async (error: unknown, data?: string[]) => { if (error || !data) throw error; if (data.length === 0) { //not ignored if (statSync(absolutePath).isDirectory()) await throughDirectory(absolutePath); else files.push(absolutePath); } resolve(); }); }); } } const getNotIgnoredFiles = async (): Promise<string[]> => { await throughDirectory(path.resolve(__dirname, "..")); return files; }; process.on("unhandledRejection", (reason) => { throw reason; }); const notIgnoredFiles = await getNotIgnoredFiles(); const cspellProcess = spawn("cspell --dot --fail-fast --file-list stdin", [], { shell: true, }); notIgnoredFiles.forEach((file) => { cspellProcess.stdin.write(file.toString() + "\n"); }); cspellProcess.stdin.end(); cspellProcess.stdout.on("data", (data) => { console.log(data.toString()); }); cspellProcess.stderr.on("data", (data) => { console.error(data.toString()); }); cspellProcess.on("error", (error) => { console.error(`Cspell Process error:\n${error}`); process.exit(1); }); cspellProcess.on("exit", (code, signal) => { if (code) { console.log(`Cspell Process exit with code: ${code}`); process.exit(1); } if (signal) { console.log(`Cspell Process killed with signal: ${signal}`); process.exit(1); } });
The text was updated successfully, but these errors were encountered:
No branches or pull requests
cspell on windows attempts to check
test\restDocs
, need to avoid that.Probably use this script (may need to adapt it):
The text was updated successfully, but these errors were encountered: