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

flagWords doesn't override minWordLength #1895

Closed
5 of 18 tasks
Maxim-Mazurok opened this issue Oct 19, 2021 · 2 comments · Fixed by #1935
Closed
5 of 18 tasks

flagWords doesn't override minWordLength #1895

Maxim-Mazurok opened this issue Oct 19, 2021 · 2 comments · Fixed by #1935

Comments

@Maxim-Mazurok
Copy link
Contributor

Info

Kind of Issue

  • runtime - command-line tools
  • building / compiling
  • security
  • change in behavior
  • crash / error

Which Tool or library

  • cspell -- the command-line spelling tool
  • cspell-tools -- used for building dictionary files
  • cspell-lib -- library that does the actual spell checking.
  • cspell-trie -- tool for working with trie files.

Which Version

Version: 5.6.6

Issue with supporting library?

  • No
  • cspell-glob -- library for matching glob patterns
  • cspell-io -- thin file i/o library
  • cspell-trie-lib - trie lib
  • cspell-trie2-lib - trie lib alternate format

OS:

  • Macos
  • Linux
  • Windows
  • Other

version:

Ubuntu 20.04.3 LTS
Windows 10

Bug Description

Describe the bug

I've used example config: https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell#example-cspelljson-file
And it doesn't flag "hte" word, or any other 3 letter words that I explicitly want to flag, because only 4+ letter words are being checked, according to the default minWordLength flag.
From the example, I and my colleague assumed that it'll let us flag words of any length. It literally says "flagWords - list of words to be always considered incorrect".

$ cspell trace hte
hte - [words]              From Settings `words` and `userWords`
hte - [ignoreWords]        From Settings `ignoreWords`
hte * [flagWords]          From Settings `flagWords`

To Reproduce

Steps to reproduce the behavior:

  1. Use example config: https://github.com/streetsidesoftware/cspell/tree/main/packages/cspell#example-cspelljson-file
  2. Create file file.txt with word "hte" in it
  3. Run cspell file.txt
  4. See that "hte" isn't flagged

Expected behavior

I expect that flagWords will always be flagged as incorrect, no matter the minWordLength. So in the example above, "hte" should be flagged as incorrect.

Screenshots

image

cspell.json

{
	"version": "0.2",
	"language": "en",
	"flagWords": ["hte"]
}
@Jason3S
Copy link
Collaborator

Jason3S commented Oct 19, 2021

@Maxim-Mazurok,

Great example. Thank you.

Jason3S added a commit that referenced this issue Nov 1, 2021
Jason3S added a commit that referenced this issue Nov 1, 2021
* Make sure flaggedWords are always checked.
  Fix: #1895
* ignore deliberate misspelling
* Update English dictionary
@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2021

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants