- π³πΏNew Zealand quietone
Changing to a related issue because closing the core issue isn't dependent on this one.
Core will need an issue when this is fixed.
- π¦πΉAustria klausi π¦πΉ Vienna
We use cspell now to check for spelling, so another approach would be to add more bad flagWords into core's .cspell.json file. But I think that has the downside that it would not propagate to Drupal contrib projects, they would have to add the same flagWords to their cspell config? Not sure how the cspell gitlab job works.
So a sniff in Coder could be the more universal approach.
- π¬π§United Kingdom jonathan1055
Hi Klausi,
Actually we have just implemented a solution for all Contrib for this, just like core (actually a bit better). We have added not only "blacklist" and "whitelist" but also "blacklists", "blacklisted", "whitelists" and "whitelisted" to theflagWords
array in the default.cspell.json
which every Contrib project will automatically (except the 117 projects that have their own custom .cspell.json). For these projects they will get an advisory message in the log saying that these words should be added to their custom file. We also used the cpell syntax to give suggested alternatives 'blocklist', 'denylist' and 'allowlist'.The issue is π Add blacklist and whitelist to flagWords Active and here is the Change Record β .We do actually have a mechanism already in place to automatcally add words (or make any changes) to a project's existing custom file before the job runs, but in this case we took the decision not to 'force-add' these words as it was thought we should respect the projects file and settings. But thinking about it again, we could always automatically add the flagwords by default but allow an opt-out for the rare occasions when to clean up a project is not feasable. Although we document how to ignore specific lines, in the issue Change Record.
So I would be in favor of adding a follow-up issue in Gitlab Templates to make this change even effect the 117 projects with a custom config.
- π¦πΉAustria klausi π¦πΉ Vienna
Agreed - please put any bad words in the cspell config of Drupal core and the cspell config of the gitlab template.
- π¬π§United Kingdom jonathan1055
Following my thoughts in #8 I have opened π Add core flagWords even when project has a custom .cspell.json Active so that even those contrib projects that have their own
.cspell.json
will be alerted for use of these flagged words.