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

Add a general analyzer for postfix generics #39

Merged
merged 8 commits into from
Nov 17, 2023

Conversation

sheridanchris
Copy link
Contributor

This replaces the existing SquareBracketArrayAnalyzer and covers every case where the postfix generic style should be applied.

This will close #34

@sheridanchris sheridanchris marked this pull request as ready for review November 16, 2023 19:14
@sheridanchris
Copy link
Contributor Author

sheridanchris commented Nov 16, 2023

This can easily be modified to create an additional The generic is using the postfix style but it should follow the .NET style diagnostic if necessary. Please let me know and I'll include it!

Copy link
Contributor

@dawedawe dawedawe left a comment

Choose a reason for hiding this comment

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

Thanks! Super solid work again.

Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Solid work! Maybe add one more test for a nested scenario.
What gets reported for let a : array<list<int>> = Array.empty?

src/Ionide.Analyzers/Style/PostfixGenericsAnalyzer.fs Outdated Show resolved Hide resolved
Copy link
Contributor

@nojaf nojaf left a comment

Choose a reason for hiding this comment

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

Great work! Many thanks!

@nojaf nojaf merged commit 4fef1ed into ionide:main Nov 17, 2023
5 checks passed
@sheridanchris sheridanchris deleted the postfix-generics-analyzer branch November 17, 2023 23:38
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.

Extend the postfix generics analyzer
3 participants