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

Analyzers #515

Merged
merged 11 commits into from
Feb 26, 2024
Merged

Analyzers #515

merged 11 commits into from
Feb 26, 2024

Conversation

ErikEJ
Copy link
Collaborator

@ErikEJ ErikEJ commented Feb 25, 2024

fixes #170

Includes support for the built-in rules and the list of rules here: https://github.com/tcartwright/SqlServer.Rules/blob/master/docs/table_of_contents.md
and here: https://github.com/davebally/TSQL-Smells

Includes ability to supress rules and groups of rules

Copy link
Member

@jmezach jmezach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I was just wondering if we need to add a test project for this as well.

@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

@jmezach I will add a test project, just need to .Targets in place, maybe you can help?

@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

@jmezach I tried and failed, as you can see from a previous commit, maybe you can guide me? cd58dfb

@jmezach
Copy link
Member

jmezach commented Feb 26, 2024

What problem are you running into?

@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

@jmezach Maybe you can check my commit, this is the build error: https://github.com/rr-wfm/MSBuild.Sdk.SqlProj/actions/runs/8045635831/job/21971290181

@jmezach
Copy link
Member

jmezach commented Feb 26, 2024

You'll probably want to add a condition on <CodeAnalysisRulesArgument> so that it is only set if certain rules are ignored. Right now you're always passing the -ar command line option, but without any arguments.

@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

@jmezach > You'll probably want to add a condition on

😄 - yeah, makes sense, but I have no clue how to do that - sorry!

@jmezach
Copy link
Member

jmezach commented Feb 26, 2024

Something like <CodeAnalysisRulesArgument Condition="'$(CodeAnalysisRules)'!=''">-ar $(CodeAnalysisRules)</CodeAnalysisRulesArgument>

@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

@jmezach I got a test project running now

Will do a docs update once this is in

@ErikEJ ErikEJ requested a review from jmezach February 26, 2024 12:22
@ErikEJ
Copy link
Collaborator Author

ErikEJ commented Feb 26, 2024

image

Copy link
Member

@jmezach jmezach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

Copy link
Collaborator

@jeffrosenberg jeffrosenberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with one small comment

@ErikEJ ErikEJ merged commit c14cf94 into rr-wfm:master Feb 26, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Question: Compatibility with SSDT rules?
3 participants