Skip to content
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

Violation of some rules only generate IntelliSense errors, but not build errors #1718

Closed
mzervos opened this issue Oct 31, 2015 · 9 comments
Closed

Comments

@mzervos
Copy link

mzervos commented Oct 31, 2015

Some rules (like SA1642) produce InitelliSense errors but the project builds successfully without reporting those errors. I'm using beta15 version.
I don't see any warnings/errors on msbuild logs (i have set verbosity to Diagnostic)

code
build_intellisense
build
settings

@sharwell
Copy link
Member

Do you see any AD0001 instances in your diagnostic build output?

@mzervos
Copy link
Author

mzervos commented Oct 31, 2015

No. I couldn't find anything weird in the build output. Here it is: http://pastebin.com/Rz5g9rgs

@mzervos
Copy link
Author

mzervos commented Oct 31, 2015

I notice the same behavior for the following rules:
SA1514
SA1609
SA1642
SA1643

@sharwell
Copy link
Member

sharwell commented Nov 1, 2015

@mzervos Thanks, that's very helpful. We recently fixed similar issues in a number of spacing rules. Currently I'm not sure what's causing the discrepancy for the rules you identified but we'll figure it out! 😄

@sharwell
Copy link
Member

sharwell commented Nov 7, 2015

@mzervos Do you have SA1652 disabled? If so, can you make sure to enable that and see if it reports warnings during the build?

@mzervos
Copy link
Author

mzervos commented Nov 10, 2015

@sharwell Yes, SA1652 is disabled. If I enabled it, the other rules cause errors on build as well.
Is this the expected behavior or is it a bug?
I'd prefer to be able to enable the other rules without having to enable XML documentation output.

@sharwell
Copy link
Member

I'd prefer to be able to enable the other rules without having to enable XML documentation output.

This is not possible. SA1652 should not be disabled, even if you are not using the output files. See the documentation for SA1652 for more information.

@mzervos
Copy link
Author

mzervos commented Nov 10, 2015

How are they enabled and detected on IntelliSense though without having SA1652 turned on?

@sharwell
Copy link
Member

How are they enabled and detected on IntelliSense though without having SA1652 turned on?

I have no idea actually. It could be that Roslyn uses special settings for the IntelliSense parser in order to properly apply syntax highlighting and other editor features inside of documentation comments, but these are disabled when compiling unless the XML output is enabled. I'm going to mark this as external since it's other case where the underlying cause of dotnet/roslyn#2773 is causing problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants