GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable SA1000: Keywords should be spaced correctly by xtqqczze · Pull Request #13973 · PowerShell/PowerShell

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Nov 2, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ghost ghost assigned Andrew (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
@xtqqczze
xtqqczze force-pushed the SA1000 branch from f233509 to 75eaccc Compare November 10, 2020 01:03
@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
@xtqqczze
Enable SA1000: Keywords should be spaced correctly
cd4d51e
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md
@xtqqczze
xtqqczze force-pushed the SA1000 branch from 75eaccc to cd4d51e Compare November 18, 2020 19:35
@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

Ilya (iSazonov) commented Nov 21, 2020

Copy link
Copy Markdown
Collaborator

Still draft?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze
xtqqczze marked this pull request as ready for review November 23, 2020 10:16
@xtqqczze
xtqqczze requested review from Travis Plunk (TravisEz13), Aditya Patwardhan (adityapatwardhan), Andrew (anmenaga) and Dongbo Wang (daxian-dbw) as code owners November 23, 2020 10:16
@ghost ghost added the Review - Needed The PR is being reviewed label Nov 30, 2020
@ghost

Deleted user (ghost) commented Nov 30, 2020

Copy link
Copy Markdown

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Nov 30, 2020

Copy link
Copy Markdown
Contributor Author

Ilya (@iSazonov) Please review and merge.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

iSazonov
Ilya (iSazonov) approved these changes Nov 30, 2020
View reviewed changes
@iSazonov Ilya (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
iSazonov
Ilya (iSazonov) reviewed Nov 30, 2020
View reviewed changes
Comment thread test/tools/WebListener/Controllers/ResumeController.cs
@@ -113,7 +113,7 @@ private void SetResumeResponseHeaders()
private bool TryGetRangeHeader(out string rangeHeader)
{
var rangeHeaderSv = new StringValues();

@iSazonov Ilya (iSazonov) Nov 30, 2020

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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();

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@xtqqczze xtqqczze Nov 30, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@iSazonov Ilya (iSazonov) Nov 30, 2020

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

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?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@iSazonov
Ilya (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 Ilya (iSazonov) assigned Ilya (iSazonov) and unassigned Andrew (anmenaga) Nov 30, 2020
@iSazonov Ilya (iSazonov) added this to the 7.2.0-preview.2 milestone Nov 30, 2020
@xtqqczze

xtqqczze commented Nov 30, 2020

Copy link
Copy Markdown
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.

PowerShell/src/Microsoft.Management.Infrastructure.CimCmdlets/RemoveCimInstanceCommand.cs

Line 288 in db94377

CimRemoveCimInstance cimRemoveInstance = new();

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Nov 30, 2020

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze xtqqczze mentioned this pull request Nov 30, 2020
Disable SA1000: Keywords should be spaced correctly #14292
Closed
@xtqqczze

xtqqczze commented Nov 30, 2020

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Nov 30, 2020

Copy link
Copy Markdown
Contributor Author

Steve Lee (@SteveL-MSFT) Travis Plunk (@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 Ilya (@iSazonov)

Originally posted by Rob Holt (@rjmholt) in #9900 (comment)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze

xtqqczze commented Nov 30, 2020

Copy link
Copy Markdown
Contributor Author

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iSazonov

Ilya (iSazonov) commented Dec 1, 2020

Copy link
Copy Markdown
Collaborator

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

Ah, clear! We catch this again :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xtqqczze
xtqqczze deleted the SA1000 branch December 1, 2020 08:44
@ghost

Deleted user (ghost) commented Dec 15, 2020

Copy link
Copy Markdown

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

Handy links:

  • Release Notes
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Thatgfsj (Thatgfsj) pushed a commit to Thatgfsj-contribs/PowerShell that referenced this pull request Aug 6, 2026
@xtqqczze
Enable SA1000: Keywords should be spaced correctly (PowerShell#13973)
9165cc8
https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@iSazonov Ilya (iSazonov) iSazonov approved these changes
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) Awaiting requested review from adityapatwardhan
@anmenaga Andrew (anmenaga) Awaiting requested review from anmenaga
@daxian-dbw Dongbo Wang (daxian-dbw) Awaiting requested review from daxian-dbw
@TravisEz13 Travis Plunk (TravisEz13) Awaiting requested review from TravisEz13

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@iSazonov Ilya (iSazonov)

Labels

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

Projects

None yet

Milestone

7.2.0-preview.2

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@xtqqczze @iSazonov @anmenaga
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.