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

FxCopAnalyzer fixes for Wox.Test #7312

Merged
merged 12 commits into from
Oct 22, 2020

Conversation

avneet-kr
Copy link
Contributor

@avneet-kr avneet-kr commented Oct 15, 2020

Summary of the Pull Request

This PR includes fixes for FxCop errors for Wox.Test

PR Checklist

  • Applies to [Chore] Enable Static analysis (FxCopAnalyzers) on C# Projects #5129
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Info on Pull Request

  • Enabled FxCopAnalyzer for Wox.Test
  • Added InvarientCulture info (CA1305: Specify IFormatProvider)
  • Removed underscore from method names (CA1707: Identifiers should not contain underscores)
  • Marked members as static (CA1822: Mark members as static)
  • Removed initialization for DummyTestClass::IsFunctionCalled (CA1805: Do not initialize unnecessarily)
  • Replaced Count with Any (CA1827: Do not use Count/LongCount when Any can be used)
  • Changed WoxTest::DummyTestClass to private (CA1034: Nested types should not be visible)
  • Suppressed warnings for uninstantiated internal classes used as TestFixtures (CA1812: Avoid uninstantiated internal classes)

Validation Steps Performed

All changes were validated by building and running unit tests

@avneet-kr avneet-kr requested a review from a team October 15, 2020 16:45
@avneet-kr avneet-kr changed the title Fx cop analyzer wox test FxCopAnalyzer fixes for Wox.Test Oct 15, 2020
…oved inline supression messages (CA1812: Avoid uninstantiated internal classes)
@avneet-kr
Copy link
Contributor Author

PR has been updated to address comments:

  • Changed InvariantCulture to Ordinal where appropriate
  • Added suppression message for CA1812 in GlobalSuppressions.cs and removed inline supression messages (CA1812: Avoid uninstantiated internal classes)
  • Updated justification for CA1812 in GlobalSuppressions.cs (Avoid uninstantiated internal classes)

@avneet-kr
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@avneet-kr avneet-kr closed this Oct 22, 2020
@avneet-kr avneet-kr reopened this Oct 22, 2020
@avneet-kr avneet-kr merged commit cfe9e23 into microsoft:master Oct 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants