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

Code fix: UseBuiltInTypeAlias #304

Closed
sharwell opened this issue Dec 5, 2014 · 4 comments
Closed

Code fix: UseBuiltInTypeAlias #304

sharwell opened this issue Dec 5, 2014 · 4 comments
Assignees

Comments

@sharwell
Copy link
Member

sharwell commented Dec 5, 2014

Implement code fix for #54.

@pdelvo
Copy link
Member

pdelvo commented Jan 11, 2015

Visual Studio provides a built in solution to do this so I don't think we need a code fix for it.

@sharwell
Copy link
Member Author

The Simplify Type Name code fix does handle this, but I noticed that the batch fixer it uses only operates on a single specific type of violation. For example, if you tell it to simplify UInt32, it will replace all instance of UInt32 with uint. However, it will not replace any instances of Int32 with int (you would have to invoke it separately for that case). It will also not replace any instance of System.UInt32 (the fully-qualified reference) with uint (also need to invoke it separately for this case).

I believe a general code fix could be implemented for SA1121 which covers all instances of this specific violation while ignoring all the other kinds of simplification which might be performed by the built-in Simplify Type Name code fix.

@sharwell
Copy link
Member Author

I'm reopening this issue, because we could do a better job of implementing this rule than Visual Studio currently does. It's a relatively low priority issue though because we do have an alternative available.

@sharwell sharwell reopened this Aug 10, 2015
@sharwell
Copy link
Member Author

Fixed in #350.

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