Skip to content

Excluding code in the context of a GeneratedCodeAttribute - #33

Closed
afscrome wants to merge 12 commits into
DustinCampbell:masterfrom
afscrome:master
Closed

afscrome wants to merge 12 commits into
DustinCampbell:masterfrom
afscrome:master

Conversation

@afscrome

Copy link
Copy Markdown

Fixes #26.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unnecessary newlines here

Comment thread Source/CSharpEssentials/Extensions.cs Outdated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Are there any other syntax kinds we need to check?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Yup. You missed at least EventFieldDeclarations. Getting this right is hard. You might just try simple 'as' checks to BaseMethodDeclarationSyntax, BasePropertyDeclarationSyntax, BaseTypeDeclarationSyntax, etc. AttributeLists should be declared on those base types.

…e is exactly System.CodeDom.Compiler.GeneratedCodeAttribute rather than a crude string Contains check.
Conflicts:
	Source/CSharpEssentials/Extensions.cs

	Source/CSharpEssentials/GetterOnlyAutoProperty/UseGetterOnlyAutoPropertyAnalyzer.cs

	Source/CSharpEssentials/UseExpressionBodiedMember/UseExpressionBodiedMemberAnalyzer.cs
	Source/CSharpEssentials/UseNameOf/UseNameOfAnalyzer.cs
…axNode, context) as it can be retreived from SyntaxNodeAnalysisContext.
…te for ExpressionBodiedMember & GetterOnlyAutoProperty analysers.
@afscrome afscrome closed this Sep 30, 2017
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.

3 participants