8000 Enable SA1000: Keywords should be spaced correctly by xtqqczze · Pull Request #13973 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@xtqqczze
Copy link
Contributor
@xtqqczze xtqqczze commented Nov 2, 2020

@ghost ghost assigned anmenaga Nov 2, 2020
@ghost ghost added the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 6, 2020
@ghost ghost added Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept and removed Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept labels Nov 10, 2020
@ghost ghost removed the Waiting on Author The PR was reviewed and requires changes or comments from the author before being accept label Nov 18, 2020
@iSazonov
Copy link
Collaborator

Still draft?

@xtqqczze xtqqczze marked this pull request as ready for review November 23, 2020 10:16
@ghost ghost added the Review - Needed The PR is being reviewed label Nov 30, 2020
@ghost
Copy link
ghost commented Nov 30, 2020

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

@xtqqczze
Copy link
Contributor Author

@iSazonov Please review and merge.

@iSazonov iSazonov added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Nov 30, 2020

private bool TryGetRangeHeader(out string rangeHeader)
{
var rangeHeaderSv = new StringValues();
Copy link
Collaborator

Choose a reason for hiding this comment

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

@xtqqczze For my education - does an analyzer recognize the "var" pattern to convert to

            StringValues rangeHeaderSv = new();

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not aware of such an analyzer, but one could use RCS1012 codefix first.

Copy link
Collaborator

Choose a reason for hiding this comment

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

So we should apply RCS1012 and then apply a fix to the new pattern?

@iSazonov iSazonov merged commit db94377 into PowerShell:master Nov 30, 2020
@ghost ghost removed the Review - Needed The PR is being reviewed label Nov 30, 2020
@iSazonov iSazonov assigned iSazonov and unassigned anmenaga Nov 30, 2020
@iSazonov iSazonov added this to the 7.2.0-preview.2 milestone Nov 30, 2020
@xtqqczze
Copy link
Contributor Author

I'm seeing warnings on the following pattern in live analysis, I'm surprised CI did not fail:

SA1000: The keyword 'new' should be followed by a space.

This issue was fixed in DotNetAnalyzers/StyleCopAnalyzers#3187, and is in the v1.2.0-beta.261 release.

@iSazonov
Copy link
Collaborator

I'm surprised CI did not fail:

CI makes clean loading packages. So I guess if you see the warning you need clean your local package cache.

@xtqqczze
Copy link
Contributor Author

I'm surprised CI did not fail:

CI makes clean loading packages. So I guess if you see the warning you need clean your local package cache.

CI is now failing

@xtqqczze
Copy link
Contributor Author

@SteveL-MSFT @TravisEz13 those build errors are coming from files I haven't touched in this PR. Not sure what's up there, I'm guessing something got merged that for some reason managed not to trigger the build errors but should have?

Yeah I'm not able to build this branch locally either.

Looks like it's coming from these, but checks for those PRs passed.

Looking into how best to fix (and ideally prevent from reoccurring).

/cc @iSazonov

Originally posted by @rjmholt in #9900 (comment)

@xtqqczze
Copy link
Contributor Author
8000

Between tests for this PR passing (12 days ago), we merged IDE0090 PRs, which conflicted as the version of StyleCopAnalyzers in use at the time did not support target-typed new expressions properly.

We could reduce the likelihood of similar issues occurring again by running tests again between approval and merge.

@iSazonov
Copy link
Collaborator
iSazonov commented Dec 1, 2020

We could reduce the likelihood of similar issues occurring again by running tests again between approval and merge.

Ah, clear! We catch this again :-)

@xtqqczze xtqqczze deleted the SA1000 branch December 1, 2020 08:44
@ghost
Copy link
ghost commented Dec 15, 2020

🎉v7.2.0-preview.2 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

0