Skip to content

Commit

Permalink
Merge pull request #9776 from Youssef1313/patch-6
Browse files Browse the repository at this point in the history
chore(deps): Update NetAnalyzers to latest preview and disable for test projects
  • Loading branch information
jeromelaban authored Sep 9, 2022
2 parents a58c25d + 68065be commit 9096840
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,11 @@
<!-- Enable performance CA rules from 'Microsoft.CodeAnalysis.NetAnalyzers' as build warnings by default. Specific rules are disabled or downgraded in repo's editorconfig. -->
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisModePerformance>AllEnabledByDefault</AnalysisModePerformance>
<UnoDisableNetAnalyzers Condition="'$(IsTestProject)' != 'true' and '$(IsSampleProject)' != 'true' and '$(UnoDisableNetAnalyzers)' == ''">true</UnoDisableNetAnalyzers>
</PropertyGroup>

<ItemGroup Condition="'$(UnoDisableNetAnalyzers)'==''">
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="6.0.0" PrivateAssets="All" />
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22362.3" PrivateAssets="All" />
</ItemGroup>

<Choose>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<PropertyGroup>
<TargetFrameworks>net461</TargetFrameworks>
<NoWarn>1998;4014;67;CA1014</NoWarn>
<NoWarn>1998;4014;67</NoWarn>
<OutputPath>bin\$(Platform)\$(Configuration)</OutputPath>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<ImportFrameworkWinFXTargets>false</ImportFrameworkWinFXTargets>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@ public bool Prepare(Context context, Bitmap buffer, float radius)
_mRenderScript = RenderScript.Create(context);
_mBlurScript = ScriptIntrinsicBlur.Create(_mRenderScript, Element.U8_4(_mRenderScript));
}
catch (Android.Renderscripts.RSRuntimeException e)
catch (Android.Renderscripts.RSRuntimeException)
{
#pragma warning disable CS0162
if (DEBUG)
{
throw e;
throw;
}
else
{
Expand Down

0 comments on commit 9096840

Please sign in to comment.