Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

add fxcop analyzer #162

Merged
merged 5 commits into from
Aug 28, 2018
Merged

add fxcop analyzer #162

merged 5 commits into from
Aug 28, 2018

Conversation

TimothyMothra
Copy link
Member

Add the FxCop Analyzer to Non-Test projects.

This analyzer identifies SEVERAL compiler errors.
If you're bored one afternoon, feel free to pull this branch and fix a couple! :)

dreamwork

@SergeyKanzhelev
Copy link
Contributor

@MS-TimothyMothra this approach never works. I'd suggest merge fixes as you go. So you will not end up with enormous merge conflict in a few weeks.

@TimothyMothra
Copy link
Member Author

@SergeyKanzhelev I'm open to suggestions for a better approach.
I thought this might be the easiest for the whole team to contribute to.

Across all our repos there are over 700 errors. It will almost certainly be required to resolve these before our next SDL review. We can discuss more offline.

@SergeyKanzhelev
Copy link
Contributor

I'm suggesting to send fixes in separate PRs and merge them as you making them. Like you did 3 fixes - send them as a separate PR. Perhaps this may be a good instruction:

git checkout -b fxcop/feelBraveToday
git cherry-pick 9801d05246043bf99bccd7d336573601541460e3

... 
do the fixes
...

git revert <cherry-pick commit ID>
git push

Maybe fixing everything in one PR will also work as this repo has low traffic overall.

Thanks again for starting it! 👍

@TimothyMothra TimothyMothra changed the title add fxcop analyzer (help needed) add fxcop analyzer Aug 24, 2018
@TimothyMothra
Copy link
Member Author

TimothyMothra commented Aug 24, 2018

Only 4 remaining issues.

@SergeyKanzhelev this is ready to be reviewed.
When @Dmitry-Matveev gets back, I want to discuss if we should wait to merge this with a Beta1 release.

@TimothyMothra
Copy link
Member Author

@Dmitry-Matveev this is a medium PR. :)

@@ -21,7 +21,8 @@
<Optimize>true</Optimize>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<!-- Need to disable WarningsAsErrors until all FxCop issues are fixed. -->
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
Copy link
Contributor

Choose a reason for hiding this comment

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

do you have work item for this so we wouldn't forget?

@@ -29,6 +29,10 @@
<PackageReference Include="Desktop.Analyzers" Version="1.1.0">
<PrivateAssets>All</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.6.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
Copy link
Contributor

Choose a reason for hiding this comment

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

this is default as I understand. Why you need it explicitly?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was inserted by default. I haven't tested without.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd suggest to remove to avoid confusion

@SergeyKanzhelev SergeyKanzhelev merged commit 482f176 into develop Aug 28, 2018
@TimothyMothra TimothyMothra deleted the add_fxcop_analyzer branch September 13, 2018 20:46
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.

3 participants