@@ -14,14 +14,44 @@ BuildParameters.SetParameters(
14
14
twitterMessage : standardNotificationMessage ,
15
15
preferredBuildProviderType : BuildProviderType . GitHubActions ,
16
16
shouldRunDotNetCorePack : true ,
17
- shouldUseDeterministicBuilds : true ) ;
17
+ shouldUseDeterministicBuilds : true ,
18
+ shouldRunDupFinder : false , // dupFinder is missing since 2021.3.0-eap
19
+ shouldRunInspectCode : false // we're shipping a custom version of it below
20
+ ) ;
18
21
19
22
BuildParameters . PrintParameters ( Context ) ;
20
23
21
24
// workaround for https://github.com/cake-contrib/Cake.Recipe/issues/862
22
25
ToolSettings . SetToolPreprocessorDirectives (
23
- reSharperTools : "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2021.2.0 " ) ;
26
+ reSharperTools : "#tool nuget:?package=JetBrains.ReSharper.CommandLineTools&version=2021.3.3 " ) ;
24
27
25
28
ToolSettings . SetToolSettings ( context : Context ) ;
26
29
30
+ // additional workaround for https://github.com/cake-contrib/Cake.Recipe/issues/862
31
+ // to suppress the --build/--no-build warning that is generated in the default
32
+ BuildParameters . Tasks . InspectCodeTask = Task ( "InspectCode2021" )
33
+ . WithCriteria ( ( ) => BuildParameters . BuildAgentOperatingSystem == PlatformFamily . Windows , "Skipping due to not running on Windows" )
34
+ . Does < BuildData > ( data => RequireTool ( ToolSettings . ReSharperTools , ( ) => {
35
+ var inspectCodeLogFilePath = BuildParameters . Paths . Directories . InspectCodeTestResults . CombineWithFilePath ( "inspectcode.xml" ) ;
36
+
37
+ var settings = new InspectCodeSettings ( ) {
38
+ SolutionWideAnalysis = true ,
39
+ OutputFile = inspectCodeLogFilePath ,
40
+ ArgumentCustomization = x => x . Append ( "--no-build" )
41
+ } ;
42
+
43
+ if ( FileExists ( BuildParameters . SourceDirectoryPath . CombineWithFilePath ( BuildParameters . ResharperSettingsFileName ) ) )
44
+ {
45
+ settings . Profile = BuildParameters . SourceDirectoryPath . CombineWithFilePath ( BuildParameters . ResharperSettingsFileName ) ;
46
+ }
47
+
48
+ InspectCode ( BuildParameters . SolutionFilePath , settings ) ;
49
+
50
+ // Pass path to InspectCode log file to Cake.Issues.Recipe
51
+ IssuesParameters . InputFiles . InspectCodeLogFilePath = inspectCodeLogFilePath ;
52
+ } )
53
+ ) ;
54
+ BuildParameters . Tasks . AnalyzeTask . IsDependentOn ( "InspectCode2021" ) ;
55
+ IssuesBuildTasks . ReadIssuesTask . IsDependentOn ( "InspectCode2021" ) ;
56
+
27
57
Build . RunDotNetCore ( ) ;
0 commit comments