-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Improve Documentation Around // <auto-generated/>
#856
Comments
This is a bug in dotnet-format |
@aolszowka Sorry you are running into issues. Can you provide a repro? I added a test for this scenario and it seems to be working. |
Ugh I am SO SORRY, I cannot get this to repro either, I suspect, but cannot prove this was a PEBAK Error on my part, I have a really bad habit of misspelling generate (usually as genarate or something along those lines). Again SO SORRY To sound the alarm on this and waste everyone's time :( It would still be worth it I think to call this out somewhere in the documentation, maybe I just missed it but yeah totally MY FAULT. I will try to have a repro next time before opening an issue :( Please feel free to close this. |
@aolszowka no problem, I know I do the same thing often |
@aolszowka No worries. I agree that we should have documentation for this scenario. We also support the |
We have a third party source file that we are using (NDesk.Options) which has its own code style. We do not want to apply any formatting to this file. Instead we want to exclude this from analysis/formatting.
As per DotNetAnalyzers/StyleCopAnalyzers#2960 (comment)
The way to work around this is to put this at the top of the file:
// <auto-generated/>
However testing dotnet-format has shown that this MUST be the first line of the file, where as Visual Studio/Roslyn Analyzers appear to be a bit more forgiving (it looks like so long as it is part of the first comment block it works).
This should probably be documented somewhere if this is intended.
FWIW the .editorconfig suggestion also works as documented by Sam and should probably be called out as well.
The text was updated successfully, but these errors were encountered: