Skip to content

Commit

Permalink
migrate to net analyzers
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvreony committed Sep 5, 2021
1 parent 1a638e5 commit 6899ff5
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 4 deletions.
45 changes: 45 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Catch all for anything we forgot. Add rules if you get CRLF to LF warnings.
* text=auto

# Text files that should be normalized to LF in odb.
*.cs text eol=lf diff=csharp
*.xaml text
*.config text
*.c text
*.h text
*.cpp text
*.hpp text

*.sln text
*.csproj text
*.vcxproj text

*.md text
*.tt text
*.sh text
*.ps1 text
*.cmd text
*.bat text
*.markdown text
*.msbuild text


# Binary files that should not be normalized or diffed
*.png binary
*.jpg binary
*.gif binary
*.ico binary
*.rc binary

*.pfx binary
*.snk binary
*.dll binary
*.exe binary
*.lib binary
*.exp binary
*.pdb binary
*.sdf binary
*.7z binary

# Generated file should just use CRLF, it's fiiine
SolutionInfo.cs text eol=crlf diff=csharp
10 changes: 7 additions & 3 deletions src/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<EnableSourceLink Condition=" '$(OS)' != 'Windows_NT' AND '$(MSBuildRuntimeType)' != 'Core' ">false</EnableSourceLink>
<EnableSourceControlManagerQueries>$(EnableSourceLink)</EnableSourceControlManagerQueries>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<WarningsAsErrors />
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>

<ItemGroup Condition="$(IsTestProject)">
Expand Down Expand Up @@ -53,10 +53,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="stylecop.analyzers" Version="1.1.118" PrivateAssets="all" />
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="3.3.2" PrivateAssets="all" />
<PackageReference Include="stylecop.analyzers" Version="1.2.0-beta.354" PrivateAssets="all" />
<PackageReference Include="Roslynator.Analyzers" Version="3.2.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="5.0.3" PrivateAssets="all" />
</ItemGroup>
<!-- Net Analyzers config taken from : https://docs.microsoft.com/en-gb/visualstudio/code-quality/migrate-from-fxcop-analyzers-to-net-analyzers?view=vs-2019 -->
<PropertyGroup>
<AnalysisMode>AllEnabledByDefault</AnalysisMode>
</PropertyGroup>
<ItemGroup>
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json" Link="stylecop.json" />
</ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.9",
"version": "1.6",
"publicReleaseRefSpec": [
"^refs/heads/main$", // we release out of master
"^refs/heads/preview/.*", // we release previews
Expand Down

0 comments on commit 6899ff5

Please sign in to comment.