@@ -171,26 +171,40 @@ const getSkills = (data, file) => {
171
171
} ;
172
172
173
173
const analise = async ( section ) => {
174
+ console . log ( concolor `\nCheck: ${ section } (b,white)` ) ;
174
175
const file = `Skills/${ section } .md` ;
175
176
const md = await loadFile ( file ) ;
176
177
const skills = getSkills ( md , file ) ;
177
178
console . log ( concolor . info ( `Skills: ${ skills . length } ` ) ) ;
178
- return ;
179
+ } ;
180
+
181
+ const match = async ( role ) => {
182
+ console . log ( concolor `\nRoles: ${ role } (b,white)` ) ;
183
+ const file = `.github/src/Roles/${ role } .md` ;
184
+ const md = await loadFile ( file ) ;
185
+ console . log ( concolor . info ( `Size: ${ md . length } ` ) ) ;
179
186
} ;
180
187
181
188
( async ( ) => {
182
189
console . log ( concolor . white ( TITLE ) ) ;
183
190
console . log ( concolor . info ( 'Auto Checker' ) ) ;
184
191
185
- const files = await fs . readdir ( `${ PATH } /Skills/` ) ;
186
- const sections = files
192
+ const skillFiles = await fs . readdir ( `${ PATH } /Skills/` ) ;
193
+ const sections = skillFiles
187
194
. filter ( ( file ) => file . endsWith ( '.md' ) )
188
195
. map ( ( file ) => file . substring ( 0 , file . length - '.md' . length ) ) ;
189
196
for ( const section of sections ) {
190
- console . log ( concolor `\nCheck: ${ section } (b,white)` ) ;
191
197
await analise ( section ) ;
192
198
}
193
199
200
+ const roleFiles = await fs . readdir ( `${ PATH } /.github/src/Roles/` ) ;
201
+ const roles = roleFiles
202
+ . filter ( ( file ) => file . endsWith ( '.md' ) )
203
+ . map ( ( file ) => file . substring ( 0 , file . length - '.md' . length ) ) ;
204
+ for ( const role of roles ) {
205
+ await match ( role ) ;
206
+ }
207
+
194
208
const badgeCode = codeBlock ( BADGE ) ;
195
209
196
210
const report = `## ${ TITLE } \n\n${ BADGE } \n\n${ badgeCode } \n` ;
0 commit comments