From b41be5d8b339d12c15682ba554f9ea481856692b Mon Sep 17 00:00:00 2001 From: Jason Dent Date: Thu, 2 Sep 2021 13:06:58 +0200 Subject: [PATCH] test: add a test case for issue #1626 (#1627) * dev: add a test case for issue #1626 * ci: do not lint test fixtures --- .eslintrc.js | 1 + .prettierignore | 1 + cspell.json | 13 ++--- .../issues/issue-1626/.dictionary.txt | 1 + test-fixtures/issues/issue-1626/axiallary.cs | 10 ++++ test-fixtures/issues/issue-1626/cspell.json | 51 +++++++++++++++++++ .../issues/issue-1626/package-lock.json | 14 +++++ test-fixtures/issues/issue-1626/package.json | 14 +++++ 8 files changed, 99 insertions(+), 6 deletions(-) create mode 100644 test-fixtures/issues/issue-1626/.dictionary.txt create mode 100644 test-fixtures/issues/issue-1626/axiallary.cs create mode 100644 test-fixtures/issues/issue-1626/cspell.json create mode 100644 test-fixtures/issues/issue-1626/package-lock.json create mode 100644 test-fixtures/issues/issue-1626/package.json diff --git a/.eslintrc.js b/.eslintrc.js index 141c9735bc4..9b24bdd38f4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -24,6 +24,7 @@ const config = { '**/node_modules/**', 'docs/_site/**', 'integration-tests/repositories/**', + 'test-fixtures/**', 'test-packages/yarn2/**', ], parserOptions: { diff --git a/.prettierignore b/.prettierignore index 639df5f0803..b4650b136d9 100644 --- a/.prettierignore +++ b/.prettierignore @@ -15,4 +15,5 @@ integration-tests/repositories/*/*/** lerna.json packages/*/dist/ packages/cspell-bundled-dicts/cspell-default.config.js +test-fixtures/** tsconfig*.json diff --git a/cspell.json b/cspell.json index 51d0d142b21..96f7563dfea 100644 --- a/cspell.json +++ b/cspell.json @@ -17,32 +17,33 @@ ".eslintignore", ".gitattributes", ".gitignore", + ".pnp.{js,cjs}", ".prettierignore", + ".yarn", + "*.{png,jpg,pdf}", "**/.gitignore", "**/.vscode/**", "**/{cspell.*,cSpell.*,.cspell.*,cspell.config.*}", - "*.{png,jpg,pdf}", "**/*.snap", "**/*.trie", "**/coverage/**", "**/dist/**", "**/jest.config.js", "**/node_modules/**", - "**/package*.json", "**/tsconfig.json", - "test-packages/test-cspell-tools/src/*.txt", "cspell.json", - ".yarn", - ".pnp.{js,cjs}", "integration-tests/config/config.json", "integration-tests/config/repositories/**", "integration-tests/repositories/**", "integration-tests/snapshots/**", "lcov.info", "package*.json", + "package*.json", "packages/*/samples/**", "packages/Samples/**", - "temp" + "temp", + "test-fixtures/**", + "test-packages/test-cspell-tools/src/*.txt" ], "ignoreWords": [ "commitcomment" diff --git a/test-fixtures/issues/issue-1626/.dictionary.txt b/test-fixtures/issues/issue-1626/.dictionary.txt new file mode 100644 index 00000000000..90f76d6ad17 --- /dev/null +++ b/test-fixtures/issues/issue-1626/.dictionary.txt @@ -0,0 +1 @@ +# dictionary diff --git a/test-fixtures/issues/issue-1626/axiallary.cs b/test-fixtures/issues/issue-1626/axiallary.cs new file mode 100644 index 00000000000..f0c77e3c1a2 --- /dev/null +++ b/test-fixtures/issues/issue-1626/axiallary.cs @@ -0,0 +1,10 @@ +// ["Axiallary" isn't a word. · Issue #573 · streetsidesoftware/cspell-dicts](https://github.com/streetsidesoftware/cspell-dicts/issues/573) +// ["Axiallary" isn't a word. · Issue #1626 · streetsidesoftware/cspell](https://github.com/streetsidesoftware/cspell/issues/1626) +namespace axiallary +{ + public class Axiallary + { + public static string axiallary = "axiallary"; + public static string dalek = "dalek"; + } +} diff --git a/test-fixtures/issues/issue-1626/cspell.json b/test-fixtures/issues/issue-1626/cspell.json new file mode 100644 index 00000000000..31685ee9855 --- /dev/null +++ b/test-fixtures/issues/issue-1626/cspell.json @@ -0,0 +1,51 @@ +{ + "version": "0.2", + "language": "en-US", + "import": [ + "@cspell/dict-medicalterms/cspell-ext.json" + ], + "dictionaryDefinitions": [ + { + "name": "custom", + "path": "./.dictionary.txt" + } + ], + "dictionaries": [ + "bash", + "csharp", + "custom", + "dotnet", + "filetypes", + "fonts", + "medicalterms", + "powershell", + "python", + "softwareTerms" + ], + "languageSettings": [ + { + "languageId": "*", + "allowCompoundWords": false + } + ], + "ignorePaths": [ + ".jscpd.json", + ".vs", + ".vscode", + "package-lock.json", + "**/*.user", + "bin/**", + "obj/**", + "AppPackages/**", + "BundleArtifacts/**", + "super-linter.log", + "node_modules", + "package.json", + "Pipfile", + ".virtualenv" + ], + "flagWords": [ + "bicep", + "tricep" + ] +} diff --git a/test-fixtures/issues/issue-1626/package-lock.json b/test-fixtures/issues/issue-1626/package-lock.json new file mode 100644 index 00000000000..64ee5619a78 --- /dev/null +++ b/test-fixtures/issues/issue-1626/package-lock.json @@ -0,0 +1,14 @@ +{ + "name": "issue-cspell-dict-573", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@cspell/dict-medicalterms": { + "version": "1.0.27", + "resolved": "https://registry.npmjs.org/@cspell/dict-medicalterms/-/dict-medicalterms-1.0.27.tgz", + "integrity": "sha512-jL9TzFa+0bjXNZ4428qkjdsJDyDYyB42LW3v4wvKJ7lgRe978103/vGVpislom00TOLQ1JQMtL1sS1AcXi7E+A==", + "dev": true + } + } +} diff --git a/test-fixtures/issues/issue-1626/package.json b/test-fixtures/issues/issue-1626/package.json new file mode 100644 index 00000000000..468e360e3cc --- /dev/null +++ b/test-fixtures/issues/issue-1626/package.json @@ -0,0 +1,14 @@ +{ + "name": "issue-cspell-dict-573", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "MIT", + "devDependencies": { + "@cspell/dict-medicalterms": "^1.0.27" + } +}