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 — Fix CA1052 for public API by xtqqczze · Pull Request #15775 · PowerShell/PowerShell

Conversation

@xtqqczze

@xtqqczze xtqqczze commented Jul 14, 2021 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Fix CA1052: Static holder types should be Static or NotInheritable for public API.

  • Add static modifier to static holder types
  • Remove empty constructor (not valid anymore in static class

Possible breaking change: Unlikely Grey Area

Instantiating a class containing only static members has no obvious utility.

Sorry, something went wrong.

Uh oh!

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

All reactions
@ghost ghost assigned Aditya Patwardhan (adityapatwardhan) Jul 14, 2021
@xtqqczze

xtqqczze commented Jul 14, 2021

Copy link
Copy Markdown
Contributor Author

CodeFactor "complex method" issues are false positives, see #15721.

All reactions

Sorry, something went wrong.

Uh oh!

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

xtqqczze added 2 commits July 14, 2021 22:05
@xtqqczze
Fix CA1052
fca37a6
@xtqqczze
Fix CS0710
fe194aa
@xtqqczze
xtqqczze force-pushed the CA1052-p2 branch from 05d7b14 to fe194aa Compare July 14, 2021 21:05
@xtqqczze
Update standardtypes.csv
f0c974b
@xtqqczze
xtqqczze force-pushed the CA1052-p2 branch from 6cbd9f6 to f0c974b Compare July 14, 2021 21:53
@xtqqczze
xtqqczze marked this pull request as ready for review July 15, 2021 11:54
@xtqqczze
xtqqczze requested review from Travis Plunk (TravisEz13), Aditya Patwardhan (adityapatwardhan), Andrew (anmenaga) and Dongbo Wang (daxian-dbw) as code owners July 15, 2021 11:54
@xtqqczze xtqqczze changed the title Fix CA1052 Fix CA1052 for public API Jul 15, 2021
@iSazonov Ilya (iSazonov) added Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Jul 21, 2021
@SteveL-MSFT Steve Lee (SteveL-MSFT) added Committee-Reviewed PS-Committee has reviewed this and made a decision and removed Review - Committee The PR/Issue needs a review from the PowerShell Committee labels Jul 21, 2021
@SteveL-MSFT

Steve Lee (SteveL-MSFT) commented Jul 21, 2021

Copy link
Copy Markdown
Member

@PowerShell/powershell-committee reviewed this, we don't believe there's any real case where someone would be broken by this as the classes only have static members. We approve of this change.

All reactions

Sorry, something went wrong.

Uh oh!

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

@iSazonov Ilya (iSazonov) added the CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log label Jul 22, 2021
iSazonov
Ilya (iSazonov) approved these changes Jul 22, 2021
View reviewed changes
adityapatwardhan
Aditya Patwardhan (adityapatwardhan) approved these changes Jul 28, 2021
View reviewed changes
@adityapatwardhan
Aditya Patwardhan (adityapatwardhan) merged commit 055b7f3 into PowerShell:master Jul 28, 2021
@adityapatwardhan Aditya Patwardhan (adityapatwardhan) added this to the 7.2.0-preview.9 milestone Jul 28, 2021
@adityapatwardhan

Aditya Patwardhan (adityapatwardhan) commented Jul 28, 2021

Copy link
Copy Markdown
Member

xtqqczze Thank you for your contribution

All reactions

Sorry, something went wrong.

Uh oh!

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

@xtqqczze
xtqqczze deleted the CA1052-p2 branch July 28, 2021 21:21
@xtqqczze xtqqczze mentioned this pull request Jul 29, 2021
Fix CA1052 in TypeCatalogGen #15840
Merged
@ghost

Deleted user (ghost) commented Aug 23, 2021

Copy link
Copy Markdown

🎉v7.2.0-preview.9 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.

@ghost

Deleted user (ghost) commented Sep 28, 2021

Copy link
Copy Markdown

🎉v7.2.0-preview.10 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
Fix CA1052 for public API to make classes static when they only hav…
8fabc99
…e static methods (PowerShell#15775)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adityapatwardhan Aditya Patwardhan (adityapatwardhan) adityapatwardhan approved these changes
@iSazonov Ilya (iSazonov) iSazonov approved these changes
@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

@adityapatwardhan Aditya Patwardhan (adityapatwardhan)

Labels

Breaking-Change breaking change that may affect users CL-BreakingChange Indicates that a PR should be marked as a breaking change in the Change Log CL-CodeCleanup Indicates that a PR should be marked as a Code Cleanup change in the Change Log Committee-Reviewed PS-Committee has reviewed this and made a decision

Projects

None yet

Milestone

7.2.0-preview.9

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@xtqqczze @SteveL-MSFT @adityapatwardhan @iSazonov
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 01402520 — 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.