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
Issue regarding reloading and custom dictionaries and code analysis #281
Comments
In item 1, are you referring to actual dictionaries (the pair of files *.aff and *.dic) or the user dictionary where words are added while spell checking (the _User.dic)? User dictionaries do need to be named "_User.dic". Can you supply an example that demonstrates the issues in item 1 and item 2? I don't need branches, just the general structure of the folders and files so that I can better understand what you are doing. There is a bug in how the additional dictionary folders are resolved so that that may be affecting this. I've fixed that for the next release. Item 3 is to be expected. As noted in the documentation, the code analyzers run in a separate process so there is no way to have their results show in either the Spell Check Current Document or Solution/Project Spell Check tool windows. They will only show string/comment misspellings. |
Item 1. Yes I was refering to custom dictionaries. Regarding the folder structure I have:
I was able to fix most of the issues but everytime I build or run the analyzer I get more errors that were not found before. One example I can give now is the following:
I'm getting this error in the error list: As you can see it's giving several errors for the same file and the word "Mvc" does not exist on that file. In any case I assume with the rule for *.cshtml I added above in the .editorconfig in the root of that project it shouldn't check for any cshtml files. I'll try to get other examples but this is very hit and miss. Sometimes it shows errors on the error list, I double click to check the error and the error just goes away. I got a VSSpell error for the work "cancelation" in a cancelation token variable, when I double clicked to see the error the error just vanished although the word was still wrong. After I've fixed it and rebuilt it showed the same error although it was fixed. The same with other spelling errors that I've found. This is another example I could screenshot before the error went away: I had an error with "appplication", I've fixed it. The error got away. Rebuilt. The error showed up again. Double click the error, I go to the file and the error disappears. If I then call "Run Code Analysis On Solution" the errors reappear as well. So I have 3 VSSpell001 errors there of things I've fixed:
It seems everyday I open the solution I get different errors. |
I've just published an update that fixes an issue resolving dictionary paths and the default ignored words file. It should be available shortly. See if that has an effect. If not, can you supply an actual set of files I can download and test? It's much easier to do that than to try and reproduce the example based on a description alone as I may not do everything the same way that you have. Case in point, your spelling issues are showing up as errors. They're only set to report as warnings by default. Regarding building the projects, you won't see any identifier spelling warnings there since as I recall, it needs a NuGet package to apply them during the build which I did not create. You won't see anything unless you open file with code or run the code analysis option that causes them to be reported. |
Hi... It's hard to share my code due to privacy reason. Regarind VSSpell001 showing as error this is by design of the solution "Show all warnings as errors". Just a note on what I reported yesterday: I left my solution open with 0 errors and just went on my life. Today when opening the computer I had 16 new VSSpell001 errors. It seems the spell check keeps running in the background even if code analysis is not running. Could be something with Visual Studio. Just wanted to let you know. I'll test the new version of the package as soon as i I can. I can see it in the pending extension updates as version 2023.5.15.1. |
Another update... Using the new version 2023.5.15.1. Added the word "env" to the ignore dictionary and still the error shows up as a VSSpell001. Again if I leave VS open without doing anything it will find new spelling errors that didn't find before. I cannot find a way to trigger a full code analysis with the VSSpell so I can fix all spelling errors all at once. Run Code Analysis for solution or for project does not trigger new spelling errors. Already tried with "Run Code Analysis in separate process" on and off. Same result. The behavior of showing a spelling error, you click on the error, it opens the file and the error just goes away from the error list even if I don't fix it. If I close the file the error shows up again in the error list even if I corrected it. I did a small video showing this: 2023-05-16.13-45-10.mp4 |
Using the new version 2023.5.15.1 the problem with closing and opening the solution doesn't load the dictionaries.
So I think the fix for loading the dictionaries on close / open solution it's not working. |
Any updates on this issue? |
I haven't had a chance to look at it yet. I'm not sure I understand what you mean by "ran spell checker" unless you mean you did a solution/project spell check or are you just referring to opening/closing a file for the code analyzer to run? |
Ran spell checker -> solution/project spell check |
I'm also having this issue. How can I set the severity from |
@BDisp Disable the code analyzer option in the global configuration if you don't want to use it at all. If you have the "all warnings as errors" option set, you can change the VSSpell01 diagnostic to a suggestion in the .editorconfig file. That changes the warning/error underlines to gray dots instead. You can also set it to silent or none which gets rid of all the markers but that's effectively turning it off so you might as well use the spelling configuration option.
|
Thanks for the response. I really don't want to disable it because I like it a lot to speller check on xml documents, commits, etc. But I also don't like to insert it on a |
The global configuration file doesn't need to exist. If it doesn't, there are defaults it uses. Disabling the code analyzer won't disable spell checking of strings, comments, and plain text as they're separate. The code analyzer only handles identifiers. If they're showing as errors in some cases, it's likely that the project has the "show all warnings as errors" option set. |
Thank you very much. I had in the |
Just migrated everything to the new .editorconfig but I ran into some problems
Using VS 17.5.5. Extension version: 2023.5.8.0.
Current .editorconfig in the root of the solution
The text was updated successfully, but these errors were encountered: