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 for SA1203 #1129

Closed
wants to merge 768 commits into from
Closed

Conversation

hvanbakel
Copy link
Contributor

Fix for #1104

This only checks constants. Which given the discussion seems the proper implementation for this rule. It doesn't touch statics/instance fields (although they might move as a result of inserting a node before that was previously after).

tmeschter and others added 30 commits July 16, 2015 11:01
Integrate DiagnosticsTestUtilities.csproj into the build. This involves:

1. Adding semantic and pre-release versionf for this project.
2. Adding the project to the solution.
3. Adding a number of files to the project.
4. Commenting out a bunch of code that was needed in the dotnet/roslyn
   repo, but is probably not needed in dotnet/roslyn-analyzers.
1. Update the project to use the Roslyn NuGet packages.
2. Update the proejct to use the correct version numbers.
3. Add the project to the solution.
Added a comment that is specific to this tutorial about what the
AnalyzeIfStatement method does
Diagnostics for:
- missing/incorrect accessibility
- missing/incorrect return type
- missing/incorrect parameters
Code Fixes for:
- setting accessibility to private
- returning void
- taking correct parameter
Change wording, fix typos, respond to comments on the pr
… with the upgrade. This also involved converting a couple of code fixes from SyntaxFactory to SyntaxGenerator.
@sharwell
Copy link
Member

sharwell commented Aug 6, 2015

Unblocked now that #1128 is merged. 😄

@sharwell sharwell removed the blocked label Aug 6, 2015
@hvanbakel
Copy link
Contributor Author

The only thing still open is the ordering with the access modifiers, question is if this is not the concern of SA1202 and SA1204 and if this codefix should fix all of these?

@sharwell
Copy link
Member

sharwell commented Aug 7, 2015

‼️ Somehow this pull request ended up with 767 commits. That will need to be corrected before it can be merged.

@hvanbakel
Copy link
Contributor Author

I figured. I'll create a new pull request on a clean branch.
On Aug 6, 2015 10:46 PM, "Sam Harwell" notifications@github.com wrote:

[image: ‼️] Somehow this pull request ended up with 767 commits.
That will need to be corrected before it can be merged.


Reply to this email directly or view it on GitHub
#1129 (comment)
.


var fixedTestCode = @"public class Foo
{
private const string Before1 = ""test"";
Copy link
Contributor

Choose a reason for hiding this comment

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

The expected order should be.

private const string Before1 = ""test"";
public const string Before2 = ""test"";
private const string After1 = ""test"";
private int field1;
private int between;
public const string After2 = ""test"";

@hvanbakel hvanbakel closed this Aug 8, 2015
@hvanbakel hvanbakel deleted the codefix-SA1203 branch August 9, 2015 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants