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

[BuildCheck] EvaluationAnalysisScope configured in .editorconfig doesn't work properly #10448

Closed
Tracked by #10316
GangWang01 opened this issue Jul 26, 2024 · 0 comments · Fixed by #10495
Closed
Tracked by #10316
Assignees
Labels
Area: BuildCheck Feature Request Priority:1 Work that is critical for the release, but we could probably ship without triaged

Comments

@GangWang01
Copy link
Member

GangWang01 commented Jul 26, 2024

BCTest_Repro.zip has a solution with library projects, custom props and targets file in TestImport folder, as well as .editorconfig. Binary log is also included in the zip file.

To reproduce, execute the steps below:

  1. Set environment variable set Test=true
  2. Build with analyzers: dotnet <msbuild repo root>\artifacts\bin\bootstrap\net8.0\MSBuild\MSBuild.dll BCTest_Repro.sln -analyze -restore -bl.
  3. Custom props file which is imported by ClassLibrary2.csproj accepting the environment variable Test. Because of build_check.BC0103.scope=project configured in .editorconfig, BC0103 should not be triggered. Actual result is it's triggered and even applied to SDK imports.
  4. Custom targets file copies a file to the solution folder. It's imported by ClassLibrary2.csproj and ClassLibrary3.csproj both. Because of build_check.BC0102.scope=project configured in .editorconfig, BC0102 should not be triggered. Actual result is it's triggered for the imported target.
    It looks like BuildCheck doesn't respect EvaluationAnalysisScope documentation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: BuildCheck Feature Request Priority:1 Work that is critical for the release, but we could probably ship without triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants