17
17
( multipleProjs , "Output multiple project files" ) ,
18
18
( checkProjects , "Check .csproj/.vbproj files for target framework, nullability etc." ) ,
19
19
( checkExecutableProject , "Check that there is at least one executable project per port" ) ,
20
+ ( noCodeFiles , "Output ports without any code files" ) ,
20
21
( printPortInfo , "Print info about a single port" ) ,
21
22
22
23
( generateMissingSlns , "Generate solution files when missing" ) ,
@@ -87,7 +88,7 @@ void printInfos() {
87
88
}
88
89
89
90
void missingSln ( ) {
90
- var data = infos . Where ( x => ! x . Slns . Any ( ) ) . ToArray ( ) ;
91
+ var data = infos . Where ( x => x . Slns . None ( ) ) . ToArray ( ) ;
91
92
foreach ( var item in data ) {
92
93
WriteLine ( item . LangPath ) ;
93
94
}
@@ -98,7 +99,7 @@ void missingSln() {
98
99
void unexpectedSlnName ( ) {
99
100
var counter = 0 ;
100
101
foreach ( var item in infos ) {
101
- if ( ! item . Slns . Any ( ) ) { continue ; }
102
+ if ( item . Slns . None ( ) ) { continue ; }
102
103
103
104
var expectedSlnName = $ "{ item . GameName } .sln";
104
105
if ( item . Slns . Contains ( Combine ( item . LangPath , expectedSlnName ) , StringComparer . InvariantCultureIgnoreCase ) ) { continue ; }
@@ -125,7 +126,7 @@ void multipleSlns() {
125
126
}
126
127
127
128
void missingProj ( ) {
128
- var data = infos . Where ( x => ! x . Projs . Any ( ) ) . ToArray ( ) ;
129
+ var data = infos . Where ( x => x . Projs . None ( ) ) . ToArray ( ) ;
129
130
foreach ( var item in data ) {
130
131
WriteLine ( item . LangPath ) ;
131
132
}
@@ -136,7 +137,7 @@ void missingProj() {
136
137
void unexpectedProjName ( ) {
137
138
var counter = 0 ;
138
139
foreach ( var item in infos ) {
139
- if ( ! item . Projs . Any ( ) ) { continue ; }
140
+ if ( item . Projs . None ( ) ) { continue ; }
140
141
141
142
var expectedProjName = $ "{ item . GameName } .{ item . ProjExt } ";
142
143
if ( item . Projs . Contains ( Combine ( item . LangPath , expectedProjName ) ) ) { continue ; }
@@ -164,7 +165,7 @@ void multipleProjs() {
164
165
}
165
166
166
167
void generateMissingSlns ( ) {
167
- foreach ( var item in infos . Where ( x => ! x . Slns . Any ( ) ) ) {
168
+ foreach ( var item in infos . Where ( x => x . Slns . None ( ) ) ) {
168
169
var result = RunProcess ( "dotnet" , $ "new sln -n { item . GameName } -o { item . LangPath } ") ;
169
170
WriteLine ( result ) ;
170
171
@@ -177,7 +178,7 @@ void generateMissingSlns() {
177
178
}
178
179
179
180
void generateMissingProjs ( ) {
180
- foreach ( var item in infos . Where ( x => ! x . Projs . Any ( ) ) ) {
181
+ foreach ( var item in infos . Where ( x => x . Projs . None ( ) ) ) {
181
182
// We can't use the dotnet command to create a new project using the built-in console template, because part of that template
182
183
// is a Program.cs / Program.vb file. If there already are code files, there's no need to add a new empty one; and
183
184
// if there's already such a file, it might try to overwrite it.
@@ -284,6 +285,15 @@ void checkExecutableProject() {
284
285
}
285
286
}
286
287
288
+ void noCodeFiles ( ) {
289
+ var qry = infos
290
+ . Where ( x => x . CodeFiles . None ( ) )
291
+ . OrderBy ( x => x . Lang ) ;
292
+ foreach ( var item in qry ) {
293
+ WriteLine ( item . LangPath ) ;
294
+ }
295
+ }
296
+
287
297
void tryBuild ( ) {
288
298
// if has code files, try to build
289
299
}
0 commit comments