From de15874f9871e2a59fb6ccaf126f2928e43f884f Mon Sep 17 00:00:00 2001 From: Matt Kotsenas Date: Thu, 6 Jun 2024 14:13:14 -0700 Subject: [PATCH] Extract code analysis to its own build slice and update analyzers to latest versions (#60) * Move CodeAnalysis to own build slice and fix duplicate and missing references * Update analyzers to latest versions --- Directory.Build.props | 1 + Directory.Build.targets | 1 + Directory.Packages.props | 5 +--- .../Moq.Analyzers.Test.csproj | 9 ------ Source/Moq.Analyzers/Moq.Analyzers.csproj | 4 +++ build/targets/codeanalysis/CodeAnalysis.props | 28 +++++++++++++++++ .../targets/codeanalysis/CodeAnalysis.targets | 2 ++ build/targets/codeanalysis/Packages.props | 8 +++++ build/targets/compiler/Compiler.props | 30 +------------------ 9 files changed, 46 insertions(+), 42 deletions(-) create mode 100644 build/targets/codeanalysis/CodeAnalysis.props create mode 100644 build/targets/codeanalysis/CodeAnalysis.targets create mode 100644 build/targets/codeanalysis/Packages.props diff --git a/Directory.Build.props b/Directory.Build.props index 226a1b2c..00850170 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -8,4 +8,5 @@ + diff --git a/Directory.Build.targets b/Directory.Build.targets index d05e476b..02c2c40a 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -4,4 +4,5 @@ + diff --git a/Directory.Packages.props b/Directory.Packages.props index 39041d11..9bf954a5 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -4,16 +4,13 @@ true + - - - - diff --git a/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj b/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj index b4e3a49d..8469f274 100644 --- a/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj +++ b/Source/Moq.Analyzers.Test/Moq.Analyzers.Test.csproj @@ -19,17 +19,8 @@ all - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Source/Moq.Analyzers/Moq.Analyzers.csproj b/Source/Moq.Analyzers/Moq.Analyzers.csproj index 9b38f42a..d5a79f8c 100644 --- a/Source/Moq.Analyzers/Moq.Analyzers.csproj +++ b/Source/Moq.Analyzers/Moq.Analyzers.csproj @@ -22,6 +22,10 @@ true + + + + diff --git a/build/targets/codeanalysis/CodeAnalysis.props b/build/targets/codeanalysis/CodeAnalysis.props new file mode 100644 index 00000000..e78f5421 --- /dev/null +++ b/build/targets/codeanalysis/CodeAnalysis.props @@ -0,0 +1,28 @@ + + + true + true + preview + 9999 + + + + + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + diff --git a/build/targets/codeanalysis/CodeAnalysis.targets b/build/targets/codeanalysis/CodeAnalysis.targets new file mode 100644 index 00000000..8c119d54 --- /dev/null +++ b/build/targets/codeanalysis/CodeAnalysis.targets @@ -0,0 +1,2 @@ + + diff --git a/build/targets/codeanalysis/Packages.props b/build/targets/codeanalysis/Packages.props new file mode 100644 index 00000000..19c793af --- /dev/null +++ b/build/targets/codeanalysis/Packages.props @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/build/targets/compiler/Compiler.props b/build/targets/compiler/Compiler.props index a1bb0de5..2cab0aac 100644 --- a/build/targets/compiler/Compiler.props +++ b/build/targets/compiler/Compiler.props @@ -1,35 +1,7 @@ - + enable 12.0 enable - - - true - true - preview - 9999 - - - - - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - -