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

Implement RS1038 (Strict compiler reference analysis) #6705

Merged
merged 5 commits into from
Jun 22, 2023

Conversation

sharwell
Copy link
Member

@sharwell sharwell commented Jun 21, 2023

  • 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

@codecov
Copy link

codecov bot commented Jun 21, 2023

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
Copy link
Member

@mavasani mavasani left a comment

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
@sharwell sharwell merged commit c877c9a into dotnet:main Jun 22, 2023
11 checks passed
@sharwell sharwell deleted the strict-references branch June 22, 2023 19:39
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.

RS1022 slowing down build of non-analyzer project
2 participants