@@ -21,35 +21,33 @@ public static void ConfigureCommands(this CommandApp<RootCommand> app)
2121 private static void ConfigureRunCommand ( IConfigurator config )
2222 => config . AddCommand < RunCommand > ( NameCommandConstants . Run )
2323 . WithDescription ( "Update the project folder with ATC coding rules and configurations" )
24- . WithExample ( new [ ] { "." , CreateEquivalentToRun ( 8 ) } )
25- . WithExample ( new [ ] { NameCommandConstants . Run , "." , CreateEquivalentToRun ( 4 ) , } )
26- . WithExample ( new [ ] { NameCommandConstants . Run , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToRun ( 1 ) } )
27- . WithExample ( new [ ] { NameCommandConstants . Run , CreateArgumentProjectPathWithTestFolder ( ) } )
24+ . WithExample ( [ "." , CreateEquivalentToRun ( 8 ) ] )
25+ . WithExample ( [ NameCommandConstants . Run , "." , CreateEquivalentToRun ( 4 ) ] )
26+ . WithExample ( [ NameCommandConstants . Run , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToRun ( 1 ) ] )
27+ . WithExample ( [ NameCommandConstants . Run , CreateArgumentProjectPathWithTestFolder ( ) ] )
2828 . WithExample (
29- new [ ]
30- {
31- NameCommandConstants . Run ,
32- CreateArgumentProjectPathWithTestFolder ( ) ,
33- CreateArgumentProjectTarget ( SupportedProjectTargetType . DotNetCore ) ,
34- ArgumentCommandConstants . LongUseTemporarySuppressions ,
35- ArgumentCommandConstants . LongOrganizationName , "MyCompany" ,
36- ArgumentCommandConstants . LongRepositoryName , "MyRepo" ,
37- CommandConstants . ArgumentShortVerbose ,
38- } ) ;
29+ [
30+ NameCommandConstants . Run ,
31+ CreateArgumentProjectPathWithTestFolder ( ) ,
32+ CreateArgumentProjectTarget ( SupportedProjectTargetType . DotNetCore ) ,
33+ ArgumentCommandConstants . LongUseTemporarySuppressions ,
34+ ArgumentCommandConstants . LongOrganizationName , "MyCompany" ,
35+ ArgumentCommandConstants . LongRepositoryName , "MyRepo" ,
36+ CommandConstants . ArgumentShortVerbose
37+ ] ) ;
3938
4039 private static void ConfigureSanityCheckCommand ( IConfigurator config )
4140 => config . AddCommand < SanityCheckCommand > ( NameCommandConstants . SanityCheck )
4241 . WithDescription ( "Sanity check the project files" )
43- . WithExample ( new [ ] { NameCommandConstants . SanityCheck , "." , CreateEquivalentToSanityCheck ( 8 ) } )
44- . WithExample ( new [ ] { NameCommandConstants . SanityCheck , CreateArgumentProjectPathWithTestFolder ( ) } )
42+ . WithExample ( [ NameCommandConstants . SanityCheck , "." , CreateEquivalentToSanityCheck ( 8 ) ] )
43+ . WithExample ( [ NameCommandConstants . SanityCheck , CreateArgumentProjectPathWithTestFolder ( ) ] )
4544 . WithExample (
46- new [ ]
47- {
48- NameCommandConstants . SanityCheck ,
45+ [
46+ NameCommandConstants . SanityCheck ,
4947 CreateArgumentProjectPathWithTestFolder ( ) ,
5048 CreateArgumentProjectTarget ( SupportedProjectTargetType . DotNetCore ) ,
51- CommandConstants . ArgumentShortVerbose ,
52- } ) ;
49+ CommandConstants . ArgumentShortVerbose
50+ ] ) ;
5351
5452 private static Action < IConfigurator < CommandSettings > > ConfigureOptionsFileCommands ( )
5553 => node =>
@@ -59,15 +57,15 @@ private static Action<IConfigurator<CommandSettings>> ConfigureOptionsFileComman
5957 node
6058 . AddCommand < OptionsFileCreateCommand > ( CommandConstants . NameOptionsFileCreate )
6159 . WithDescription ( "Create default options file 'atc-coding-rules-updater.json' if it doesn't exist" )
62- . WithExample ( new [ ] { CreateArgumentCommandsOptionsFileWithCreate ( ) , "." , CreateEquivalentToOptionsFileCreate ( 6 ) , } )
63- . WithExample ( new [ ] { CreateArgumentCommandsOptionsFileWithCreate ( ) , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToOptionsFileCreate ( 3 ) , } )
64- . WithExample ( new [ ] { CreateArgumentCommandsOptionsFileWithCreate ( ) , CreateArgumentProjectPathWithTestFolder ( ) , } ) ;
60+ . WithExample ( [ CreateArgumentCommandsOptionsFileWithCreate ( ) , "." , CreateEquivalentToOptionsFileCreate ( 6 ) ] )
61+ . WithExample ( [ CreateArgumentCommandsOptionsFileWithCreate ( ) , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToOptionsFileCreate ( 3 ) ] )
62+ . WithExample ( [ CreateArgumentCommandsOptionsFileWithCreate ( ) , CreateArgumentProjectPathWithTestFolder ( ) ] ) ;
6563
6664 node
6765 . AddCommand < OptionsFileValidateCommand > ( CommandConstants . NameOptionsFileValidate )
6866 . WithDescription ( "Validate the options file 'atc-coding-rules-updater.json'" )
69- . WithExample ( new [ ] { CreateArgumentCommandsOptionsFileWithValidate ( ) , "." , CreateEquivalentToOptionsFileValidate ( 4 ) , } )
70- . WithExample ( new [ ] { CreateArgumentCommandsOptionsFileWithValidate ( ) , CreateArgumentProjectPathWithTestFolder ( ) } ) ;
67+ . WithExample ( [ CreateArgumentCommandsOptionsFileWithValidate ( ) , "." , CreateEquivalentToOptionsFileValidate ( 4 ) ] )
68+ . WithExample ( [ CreateArgumentCommandsOptionsFileWithValidate ( ) , CreateArgumentProjectPathWithTestFolder ( ) ] ) ;
7169 } ;
7270
7371 private static Action < IConfigurator < CommandSettings > > ConfigureAnalyzerProvidersCommands ( )
@@ -78,22 +76,21 @@ private static Action<IConfigurator<CommandSettings>> ConfigureAnalyzerProviders
7876 node
7977 . AddCommand < AnalyzerProvidersCollectCommand > ( NameCommandConstants . AnalyzerProvidersCollect )
8078 . WithDescription ( "Collect base rules metadata from all Analyzer providers" )
81- . WithExample ( new [ ] { CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , "." , CreateEquivalentToAnalyzerProvidersCollect ( 6 ) , } )
82- . WithExample ( new [ ] { CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToAnalyzerProvidersCollect ( 3 ) } )
83- . WithExample ( new [ ] { CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , CreateArgumentProjectPathWithTestFolder ( ) } )
79+ . WithExample ( [ CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , "." , CreateEquivalentToAnalyzerProvidersCollect ( 6 ) ] )
80+ . WithExample ( [ CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , CreateArgumentProjectPathWithDot ( ) , CreateEquivalentToAnalyzerProvidersCollect ( 3 ) ] )
81+ . WithExample ( [ CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) , CreateArgumentProjectPathWithTestFolder ( ) ] )
8482 . WithExample (
85- new [ ]
86- {
87- CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) ,
88- CreateArgumentProjectPathWithTestFolder ( ) ,
89- CreateArgumentFetchMode ( ProviderCollectingMode . ReCollect ) ,
90- CommandConstants . ArgumentShortVerbose ,
91- } ) ;
83+ [
84+ CreateArgumentCommandsAnalyzerProvidersWithCollect ( ) ,
85+ CreateArgumentProjectPathWithTestFolder ( ) ,
86+ CreateArgumentFetchMode ( ProviderCollectingMode . ReCollect ) ,
87+ CommandConstants . ArgumentShortVerbose
88+ ] ) ;
9289
9390 node
9491 . AddCommand < AnalyzerProvidersCacheCleanupCommand > ( NameCommandConstants . AnalyzerProvidersCleanupCache )
9592 . WithDescription ( "Cleanup cache from Analyzer providers" )
96- . WithExample ( new [ ] { CreateArgumentCommandsAnalyzerProvidersWithCleanupCache ( ) } ) ;
93+ . WithExample ( [ CreateArgumentCommandsAnalyzerProvidersWithCleanupCache ( ) ] ) ;
9794 } ;
9895
9996 private static string CreateArgumentProjectPathWithDot ( )
0 commit comments