Skip to content
This repository was archived by the owner on Nov 12, 2026. It is now read-only.

Implement RS1038 (Strict compiler reference analysis) - #6705

Merged
sharwell merged 5 commits into
dotnet:mainfrom
sharwell:strict-references
Jun 22, 2023
Merged

sharwell merged 5 commits into
dotnet:mainfrom
sharwell:strict-references

Conversation

@sharwell

@sharwell sharwell commented Jun 21, 2023 •

Copy link
Copy Markdown
  • Implement rule for strict reference analysis

  • Update documentation for compiler references

  • Add "strict" option, where RS1038 is only enabled in strict mode, and RS1022 is only enabled in relaxed mode

    This was initially implemented by setting RS1022 to disabled-by-default, and RS1038 to enabled-by-default. Manually enabling RS1022 will restore its behavior. However, users are unlikely to know to enable RS1022 manually when RS1038 is disabled, so these should be controlled by a dedicated option.

    Relaxed validation (RS1022) may be manually enabled by adding the following to .globalconfig:

    roslyn_correctness.assembly_reference_validation = relaxed

Fixes #6676

@sharwell
sharwell force-pushed the strict-references branch from 1b4d220 to 1a0c5ff Compare June 21, 2023 21:54
@codecov

codecov Bot commented Jun 21, 2023 •

Copy link
Copy Markdown

Codecov Report

Merging #6705 (75097ba) into main (127dd35) will decrease coverage by 0.02%.
The diff coverage is 93.57%.

❗ Current head 75097ba differs from pull request most recent head cc316f3. Consider uploading reports for the commit cc316f3 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6705      +/-   ##
==========================================
- Coverage   96.39%   96.37%   -0.02%     
==========================================
  Files        1379     1390      +11     
  Lines      322290   324027    +1737     
  Branches    10461    10609     +148     
==========================================
+ Hits       310659   312283    +1624     
- Misses       9137     9205      +68     
- Partials     2494     2539      +45     

@sharwell
sharwell force-pushed the strict-references branch 2 times, most recently from f448526 to 00c3590 Compare June 22, 2023 13:26
@sharwell
sharwell force-pushed the strict-references branch from 00c3590 to 21a5c52 Compare June 22, 2023 14:00
@sharwell
sharwell marked this pull request as ready for review June 22, 2023 14:45
@sharwell
sharwell requested a review from a team as a code owner June 22, 2023 14:45

@mavasani mavasani left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the detailed documentation!

@sharwell
sharwell force-pushed the strict-references branch 2 times, most recently from 1e7e8d9 to 75097ba Compare June 22, 2023 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

RS1022 slowing down build of non-analyzer project

2 participants