Skip to content
New issue

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

Is there an option to exclude all unknown words from the output? #4613

Open
isaak654 opened this issue Jul 7, 2023 · 2 comments
Open

Is there an option to exclude all unknown words from the output? #4613

isaak654 opened this issue Jul 7, 2023 · 2 comments

Comments

@isaak654
Copy link

isaak654 commented Jul 7, 2023

Is your feature request related to a problem? Please describe.

  cspell: # run the cspell action
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v3
      - name: Install node
        uses: actions/setup-node@v3
        with:
          node-version: '18'
          cache: 'npm'
          cache-dependency-path: '**/package-lock.json'
      - name: Install CSpell
        run: npm install -g cspell@latest
      - name: Check spelling
        run: npx cspell lint --config .github/cspell/cspell.json --unique "**/CHANGELOG.md"

The configuration produces a similar output:

/home/runner/work/repo/repofolder/CHANGELOG.md:28:24 - Forbidden word (word1)
/home/runner/work/repo/repofolder/CHANGELOG.md:28:24 - Forbidden word (word2)
/home/runner/work/repo/repofolder/CHANGELOG.md:279:11 - Unknown word (user1 without @)
/home/runner/work/repo/repofolder/CHANGELOG.md:284:3 - Unknown word (user2 without @)
/home/runner/work/repo/repofolder/CHANGELOG.md:863:36 - Unknown word (user3 without @)

Describe the solution you'd like
I would like a way to exclude all unknown words in one shot from the output, so that only the forbidden words I have added in cspell.json are listed when encountered in CHANGELOG.md.

Describe alternatives you've considered
I couldn't find anything so far... adding all unknown words in a custom exclusion list is not an option for my use case, because the changelog contains several credits and I think it would be embarrassing to exclude username references one by one.

@Jason3S
Copy link
Collaborator

Jason3S commented Jul 8, 2023

@isaak654,

The spell checker does not have the feature to ignore all issues except forbidden.

It may seem annoying, but it is possible to ignore words within the document.

At the bottom of CHANGELOG.md, you could add:

<!---
cspell:ignore user1 user2 user3 user4
-->

<!--- ... --> is a markdown comment that will not render in the HTML.

@Jason3S Jason3S removed the new issue label Jul 8, 2023
@isaak654
Copy link
Author

isaak654 commented Jul 8, 2023

I appreciate your suggestion, but it would be like maintaining a second list, which is considerably larger than the one shown in the example.

I hope my feature request will be taken into consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants