question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow users to define preferred replacements for forbidden words

See original GitHub issue

Is your feature request related to a problem? Please describe. If a user receives a message that a word is forbidden, they may not understand why the word is forbidden, or what to do instead. For example, say that you want to enforce that canceled is spelled with one l instead of two, so you mark cancelled as forbidden.

However, users may now get a message such as Forbidden word (cancelled), and not know how to proceed, since the word cancelled is valid in many contexts.

Describe the solution you’d like When defining a forbidden word, allow for each word to have an optional suggested replacement. Then, instead of the possibly surprising: Forbidden word (cancelled)

If a suggested replacement is defined, it would read something like: Forbidden word (cancelled). Suggested replacement: 'canceled'

Possibly you could use a space as a separator (does space have other possible meanings in the dictionary context?)

In a custom word list: !forbiddenWord suggestedReplacement

In words section of cspell configuration:

"words": [
    "!forbiddenWord suggestedReplacement
],

In flagWords section of cspell configuration: "flagWords": ["forbiddenWord suggestedReplacement"]

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
calvinballingcommented, Dec 12, 2022

I believe my problem was a local issue, where I had multiple concurrent versions of cspell, and I wasn’t running the latest one from the command line. It’s working for me now!

0reactions
Jason3Scommented, Dec 10, 2022

@calvinballing,

At the moment, it only shows the suggestion if you use --show-suggestions:

cspell --show-suggstions "**"
Read more comments on GitHub >

github_iconTop Results From Across the Web

Elimination of Harmful Language Initiative
Using person-first language helps to not define people by just one of ... The word "preferred" suggests that non-binary gender identity is a ......
Read more >
forbidden word - Command Reference - Huawei Support
The forbidden word command configures the forbidden words in passwords. The undo forbidden word command deletes the forbidden words in passwords. By default,...
Read more >
Excluding Words Using Active Directory Password Policy
Thankfully, Active Directory lets admins define permitted terms with relative ease. The same goes for banned passwords.
Read more >
Why changing the terms blacklist and whitelist isn't as easy as ...
First, there is a diverse set of new names in the wild for “blacklist” alternatives, such as blocklist, denylist, reject list, droplist, ...
Read more >
Word list | Google developer documentation style guide
Note: This document includes references to terms that Google considers disrespectful or offensive. The terms are listed here to provide ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found