Skip to content

Commit

Permalink
feat: support .yaml and .js configuration files (#875)
Browse files Browse the repository at this point in the history
cspell will search for the following files:
```
       'package.json',
        'cspell.json',
        'cSpell.json',
        '.cspell.json',
        '.vscode/cspell.json',
        '.vscode/cSpell.json',
        '.vscode/.cspell.json',
        '.cSpell.json',
        'cspell.yaml',
        'cspell.yml',
        'cspell.js',
        'cspell.cjs',
```
  • Loading branch information
Jason3S committed Jan 21, 2021
1 parent 7122063 commit 4a07acc
Show file tree
Hide file tree
Showing 12 changed files with 235 additions and 77 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ on:
branches:
- master
- cspell4
paths:
- "**/*.js"
- "**/*.ts"
pull_request:
branches:
- master
- cspell4
paths:
- "**/*.js"
- "**/*.ts"
schedule:
- cron: "0 23 * * 0"

Expand All @@ -26,6 +20,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# Make sure it goes back far enough to find where the branch split from master
fetch-depth: 20

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
Expand Down
2 changes: 2 additions & 0 deletions cspell-dict.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ backreference
backreferences
bitjson
codecov
codeql
cosmiconfig
coverallsapp
deserialize
deserializer
Expand Down
4 changes: 1 addition & 3 deletions integration-tests/snapshots/django/django/snapshot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Repository: django/django
Url: "https://github.com/django/django.git"
Args: ["**/*.{md,py}"]
Lines:
CSpell: Files checked: 2115, Issues found: 7999 in 929 files
CSpell: Files checked: 2115, Issues found: 7992 in 929 files
exit code: 1
./django/django/django/apps/config.py:115:76 - Unknown word (isclass)
./django/django/django/apps/config.py:192:41 - Unknown word (isupper)
Expand Down Expand Up @@ -114,7 +114,6 @@ Lines:
./django/django/django/contrib/admin/options.py:429:11 - Unknown word (isdisjoint)
./django/django/django/contrib/admin/options.py:643:21 - Unknown word (jquery)
./django/django/django/contrib/admin/options.py:648:14 - Unknown word (urlify)
./django/django/django/contrib/admin/options.py:650:21 - Unknown word (xregexp)
./django/django/django/contrib/admin/options.py:79:15 - Unknown word (DBFIELD)
./django/django/django/contrib/admin/static/admin/css/vendor/select2/LICENSE-SELECT2.md:3:43 - Unknown word (Vaynberg)
./django/django/django/contrib/admin/templatetags/admin_list.py:100:62 - Unknown word (fget)
Expand Down Expand Up @@ -156,7 +155,6 @@ Lines:
./django/django/django/contrib/auth/management/commands/changepassword.py:25:25 - Unknown word (nargs)
./django/django/django/contrib/auth/management/commands/createsuperuser.py:40:16 - Unknown word (noinput)
./django/django/django/contrib/auth/management/commands/createsuperuser.py:98:41 - Unknown word (isatty)
./django/django/django/contrib/auth/password_validation.py:165:18 - Unknown word (gzipped)
./django/django/django/contrib/auth/password_validation.py:166:31 - Unknown word (deduplicated)
./django/django/django/contrib/auth/urls.py:18:18 - Unknown word (uidb)
./django/django/django/contrib/auth/validators.py:4:38 - Unknown word (deconstructible)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Repository: typescript-cheatsheets/react
Url: "https://github.com/typescript-cheatsheets/react.git"
Args: ["**/*.{ts,js,md}"]
Lines:
CSpell: Files checked: 54, Issues found: 505 in 44 files
CSpell: Files checked: 54, Issues found: 496 in 44 files
exit code: 1
./typescript-cheatsheets/react/CONTRIBUTING.md:20:39 - Unknown word (swyx's)
./typescript-cheatsheets/react/CONTRIBUTING.md:22:12 - Unknown word (docsite)
Expand Down Expand Up @@ -198,9 +198,6 @@ Lines:
./typescript-cheatsheets/react/docs/migration/js-docs.md:16:84 - Unknown word (Gleb)
./typescript-cheatsheets/react/docs/migration/js-docs.md:16:89 - Unknown word (Bahmutov)
./typescript-cheatsheets/react/docs/migration/js-docs.md:7:3 - Unknown word (webpack's)
./typescript-cheatsheets/react/genReadme.js:1:31 - Unknown word (octokit)
./typescript-cheatsheets/react/genReadme.js:1:9 - Unknown word (Octokit)
./typescript-cheatsheets/react/genReadme.js:20:27 - Unknown word (repos)
./typescript-cheatsheets/react/genReadme.js:248:50 - Unknown word (frontmatter)
./typescript-cheatsheets/react/genReadme.js:64:49 - Unknown word (inteface)
./typescript-cheatsheets/react/website/docusaurus.config.js:1:21 - Unknown word (orgs)
Expand Down
86 changes: 60 additions & 26 deletions packages/cspell-lib/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/cspell-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"@cspell/cspell-bundled-dicts": "^5.1.0",
"comment-json": "^4.1.0",
"configstore": "^5.0.1",
"cosmiconfig": "^7.0.0",
"cspell-io": "^5.1.3",
"cspell-trie-lib": "^5.1.3",
"fs-extra": "^9.1.0",
Expand Down
5 changes: 5 additions & 0 deletions packages/cspell-lib/samples/linked/cspell.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
const cspell = {
import: ['./cspell-imports.json'],
};

module.exports = cspell;
1 change: 1 addition & 0 deletions packages/cspell-lib/samples/linked/text.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Het is leuk naar buiten te lopen.
3 changes: 3 additions & 0 deletions packages/cspell-lib/samples/yaml-config/cspell.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
id: Yaml Example Config
import:
- ./../cspell-imports.json
Loading

0 comments on commit 4a07acc

Please sign in to comment.