-
-
Notifications
You must be signed in to change notification settings - Fork 242
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
CSpell file name linting does not use (custom) CSpell configuration #2058
Comments
Good point. I know there has been some work on using relative paths recently, so maybe that will help with us.
Thank you for calling this out, but I suspect this is not a factor. I was able to reproduce this issue at MegaLinter v6.15.0 in ScribeMD/pre-commit-hooks#164. We use a single custom dictionary file, but even words like "markdownlint" that are present in the npm CSpell dictionary and "pyproject" in the Python dictionary, get reported. |
cspell looks by itself to configuration files, and as the temporary file with file names is written in a temporary folder, it does not have access to you defined config files One option could be to copy the file ith file names at the root of the repo and not in a temp folder, but we have to make sure it is well removed after, else for users using auto-commit of fixes, it will commit a useless file ^^ |
…on (#2148) * Fix CSpell file name linting does not use (custom) CSpell configuration Fixes #2058 * [MegaLinter] Apply linters fixes Co-authored-by: nvuillam <[email protected]>
Good work on fixing the underlying issue; thanks! As an aside follow-up question, doesn't the auto-commit of fixes feature use the |
@Isalgeon you're welcome, you can already try it with MegaLinter |
@nvuillam, I've just tested the feature on the latest beta version, and it works perfectly! Happy holidays! ^^ |
Yes, I could totally see extra files wrecking havoc for a subset of our users. |
Describe the bug
The new capability for the CSpell linter to also lint file names does not appear to use the (custom) CSpell configuration.
Custom words that I've got in the ignored list, which lint just fine in my documentation files, fail for the file names.
To Reproduce
Steps to reproduce the behavior:
/tmp/<some-generated-UID>-megalinter_file_names_cspell.txt
.Expected behavior
The CSpell linter must use the (custom) CSpell configuration for the new capability as well.
Example logs
Some example logs:
Additional context
The observation I had straight away is that the above-mentioned file is located in the
/tmp
folder instead of/tmp/lint
like the rest. Perhaps that affects the way the configuration is loaded and/or used.Another thing that might affect the situation is that I use multiple separate dictionary files (e.g.
words.txt
) in a.dictionaries
folder within the root of the repository instead of specifying them in a gigantic array in the CSpell configuration file.Related pull request: #2009.
The text was updated successfully, but these errors were encountered: