Skip to content

[FEATURE] Add Microsoft.CodeAnalysis.PublicApiAnalyzers (disabled warnings)#554

Merged
marcin-krystianc merged 4 commits intoG-Research:masterfrom
MohamedM216:feat-issue-415
Feb 10, 2026
Merged

[FEATURE] Add Microsoft.CodeAnalysis.PublicApiAnalyzers (disabled warnings)#554
marcin-krystianc merged 4 commits intoG-Research:masterfrom
MohamedM216:feat-issue-415

Conversation

@MohamedM216
Copy link
Contributor

@MohamedM216 MohamedM216 commented Feb 9, 2026

Description

This PR introduces Microsoft.CodeAnalysis.PublicApiAnalyzers to help prevent accidental breaking changes

Related Issues

#415

Additional Context

Checklist

Please make sure to check the following before submitting your pull request:

  • Did you read the contributing guidelines?
  • Did you update the docs?
  • Did you write any tests to validate this change?

@MohamedM216
Copy link
Contributor Author

Hi @marcin-krystianc, this PR is the first in a series aimed at addressing #415. I would greatly appreciate your guidance and feedback on it. Thanks!

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

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

Hi @MohamedM216,

thanks for opening the PR. There are some comments, but generally it looks good.


<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that IncludeAssets is necessary (I know in some blogs this is suggested approach, but as far I know it it is not needed)

Suggested change
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="5.0.0.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.CSharp" Version="4.7.0"/>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary change, please revert.

Comment on lines 15 to 17
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Copy link
Contributor

Choose a reason for hiding this comment

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

Let’s use the attribute notation; it is easier to read:

Suggested change
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4">
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.PublicApiAnalyzers" Version="3.3.4" PrivateAssets="All" />

Copy link
Contributor

@marcin-krystianc marcin-krystianc left a comment

Choose a reason for hiding this comment

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

Perfect!
Thank you @MohamedM216

In the next PR try removing the RS0016

@marcin-krystianc marcin-krystianc merged commit 4fdef6d into G-Research:master Feb 10, 2026
118 checks passed
@MohamedM216
Copy link
Contributor Author

Thanks @marcin-krystianc

In the next PR try removing the RS0016

Great, I'm excited to continue with the next steps. And of course, if run into any issues, I'll reach out.

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.

2 participants