Skip to content

Conversation

@markples
Copy link
Contributor

@markples markples commented Mar 23, 2023

Main goal is to enable the rule that all [Fact] methods are in public types.
We'll need a custom rule to check that [Fact] methods are themselves public.

  • Add reference in test_dependencies.csproj
  • Set RunAnalyzers in Directory.Build.props for merged test groups
  • Mostly disable other analyzer rules
  • Clean a few warnings - notably enable a few tests in HardwareIntrinsics by making them public

- Add reference in test_dependencies.csproj
- Set RunAnalyzers in Directory.Build.props for merged test groups
- Mostly disable other analyzer rules
- Clean a few warnings - notably enable a few tests in HardwareIntrinsics
  by making them public
@ghost
Copy link

ghost commented Mar 23, 2023

Tagging subscribers to this area: @hoyosjs
See info in area-owners.md if you want to be subscribed.

Issue Details
  • Add reference in test_dependencies.csproj
  • Set RunAnalyzers in Directory.Build.props for merged test groups
  • Mostly disable other analyzer rules
  • Clean a few warnings - notably enable a few tests in HardwareIntrinsics by making them public
Author: markples
Assignees: markples
Labels:

area-Infrastructure-coreclr

Milestone: -

@markples
Copy link
Contributor Author

/azp run runtime-coreclr outerloop

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@markples markples marked this pull request as ready for review March 23, 2023 15:37
@markples
Copy link
Contributor Author

PTAL @trylek @jkoritzinsky - one question is perhaps whether we want to just disable the .NET analyzers at the top-level all across src/tests rather than disabling-on-demand/fixing some/etc. Thanks for pointing me in the right direction! A follow up PR will be needed with a custom rule to check the method itself.

@jkoritzinsky
Copy link
Member

@markples we can use an editorconfig file like CodeAnalysis.tests.globalconfig to configure the analyzers.
Take a look at the root Directory.Build.props file around line 380 where we modify the editorconfig files. We can do the same thing in src/tests to disable the analyzers we don't want for the test projects.

@markples markples merged commit 4b98c61 into dotnet:main Mar 23, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Apr 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants