This repository was archived by the owner on Apr 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +54
-4
lines changed Expand file tree Collapse file tree 6 files changed +54
-4
lines changed Original file line number Diff line number Diff line change
1
+ #addin "Cake.Markdownlint"
1
2
#addin "Cake.Issues&prerelease"
2
3
#addin "Cake.Issues.MsBuild&prerelease"
3
4
#addin "Cake.Issues.Markdownlint&prerelease"
5
+ #addin "Cake.Issues.DupFinder&prerelease"
4
6
#addin "Cake.Issues.InspectCode&prerelease"
5
7
#addin "Cake.Issues.Reporting&prerelease"
6
8
#addin "Cake.Issues.Reporting.Generic&prerelease"
7
9
10
+ #tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
11
+
8
12
#load build / build/ build. cake
9
13
#load build/ analyze/ analyze. cake
10
14
#load build/ create- reports / create - reports . cake
Original file line number Diff line number Diff line change
1
+ #load dupfinder . cake
1
2
#load inspectcode. cake
2
3
#load markdownlint. cake
3
4
#load custom- issue . cake
4
5
5
6
Task( "Analyze")
6
7
. IsDependentOn( "Build")
8
+ . IsDependentOn( "Run-DupFinder" )
7
9
. IsDependentOn ( "Run-InspectCode" )
8
10
. IsDependentOn ( "Lint-Documentation" )
9
11
. IsDependentOn ( "Create-CustomIssues" ) ;
Original file line number Diff line number Diff line change
1
+ Task ( "Run-DupFinder" )
2
+ . Description ( "Runs JetBrains DupFinder analysis" )
3
+ . WithCriteria ( ( context ) => context . IsRunningOnWindows ( ) , "DupFinder is only supported on Windows." )
4
+ . Does < BuildData > ( ( data ) =>
5
+ {
6
+ var dupFinderLogFilePath =
7
+ data . RepoRootFolder . CombineWithFilePath ( "dupFinder.log" ) ;
8
+
9
+ // Run DupFinder
10
+ var settings = new DupFinderSettings ( ) {
11
+ OutputFile = dupFinderLogFilePath
12
+ } ;
13
+
14
+ DupFinder (
15
+ data . SourceFolder . CombineWithFilePath ( "ClassLibrary1.sln" ) ,
16
+ settings ) ;
17
+
18
+ // Read issues
19
+ var readIssuesSettings = new ReadIssuesSettings ( data . RepoRootFolder )
20
+ {
21
+ FileLinkSettings =
22
+ IssueFileLinkSettingsForGitHubBranch (
23
+ new System . Uri ( "https://github.com/cake-contrib/Cake.Issues.Reporting.Generic" ) ,
24
+ "develop" ,
25
+ "demos"
26
+ )
27
+ } ;
28
+
29
+ data . Issues . AddRange (
30
+ ReadIssues (
31
+ DupFinderIssuesFromFilePath ( dupFinderLogFilePath ) ,
32
+ readIssuesSettings ) ) ;
33
+ } ) ;
Original file line number Diff line number Diff line change 1
- #tool "nuget:?package=JetBrains.ReSharper.CommandLineTools"
2
-
3
1
Task ( "Run-InspectCode" )
4
2
. Description ( "Runs JetBrains InspectCode analysis" )
5
3
. WithCriteria ( ( context ) => context . IsRunningOnWindows ( ) , "InspectCode is only supported on Windows." )
Original file line number Diff line number Diff line change 1
- #addin "Cake.Markdownlint"
2
-
3
1
Task ( "Lint-Documentation" )
4
2
. IsDependentOn ( "Lint-DemoDocumentation" )
5
3
. IsDependentOn ( "Lint-TemplateGalleryDocumentation" ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,21 @@ public class Class1
11
11
public void Foo ( )
12
12
{
13
13
var foo = "foo" ;
14
+ var bar = "bar" ;
15
+ if ( ! string . IsNullOrEmpty ( foo ) && ! string . IsNullOrEmpty ( bar ) )
16
+ {
17
+ var foobar = foo + bar ;
18
+ }
19
+ }
20
+
21
+ public void Bar ( )
22
+ {
23
+ var foo = "foo" ;
24
+ var bar = "bar" ;
25
+ if ( ! string . IsNullOrEmpty ( foo ) && ! string . IsNullOrEmpty ( bar ) )
26
+ {
27
+ var foobar = foo + bar ;
28
+ }
14
29
}
15
30
}
16
31
}
You can’t perform that action at this time.
0 commit comments