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

Treat CodeAnalysis Errors as Build errors, not IntelliSense #529

Open
mrlmachado opened this issue Nov 20, 2024 · 0 comments
Open

Treat CodeAnalysis Errors as Build errors, not IntelliSense #529

mrlmachado opened this issue Nov 20, 2024 · 0 comments
Labels
area: build sdk Related to Microsoft.Build.Sql SDK area: code analysis Related to code analysis

Comments

@mrlmachado
Copy link

Is your feature request related to a problem? Please describe.
I'm very happy to have a new parameter for SqlCodeAnalysis task, where we can specify a custom path to locate our custom rules DLLs, SqlCodeAnalysisAssemblyPaths and I think it's amazing how it works.
But all the errors now are not being thrown as build errors in my case, but as IntelliSense errors, during VS build/rebuild command (devenv.exe /build)

This is a problem, because with previous versions of Microsoft.Data.Tools.MSBuild I could install the custom rules DDLs inside VS SQLDB DAC folder and it would throw code analysis errors as build errors, using MSBuild command line. Now, with the errors being thrown as IntelliSense errors, I cannot use msbuild command line anymore to validate my solution.

Describe the solution you'd like
Code Analysis rules errors to be thrown as build errors, not IntelliSense errors.

Describe alternatives you've considered
Using older versions of DataTools + DacFx does the trick, but I'd like to use the more recent versions of DacFx and have the SqlCodeAnalysisAssemblyPaths parameter as an option for MSBuild.

Additional context

@llali llali added the area: build sdk Related to Microsoft.Build.Sql SDK label Nov 25, 2024
@dzsquared dzsquared added the area: code analysis Related to code analysis label Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build sdk Related to Microsoft.Build.Sql SDK area: code analysis Related to code analysis
Projects
None yet
Development

No branches or pull requests

3 participants