Skip to content

Commit

Permalink
don't count overrides files
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 5, 2024
1 parent 2caca83 commit bddc5b4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/scripts/ts-status.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ const tsExpectErrorHeader = '"@ts-expect-error"';
const completeHeader = '% Complete';
const tableData = {};

const doesNotCountJS = [ '-overrides.js' ];


const percent = ( numerator, denominator ) => {
return Math.floor( ( numerator / denominator ) * 100 );
};
Expand Down Expand Up @@ -92,7 +95,9 @@ const captureData = ( path, tableData ) => {
captureData( newPath, tableData );
}
else if ( file.match( /\.js$/ ) ) {
jsCount += countLines( newPath );
if ( !_.some( doesNotCountJS, string => file.includes( string ) ) ) {
jsCount += countLines( newPath );
}
}
else if ( file.match( /\.ts$/ ) ) {
tsCount += countLines( newPath );
Expand Down

0 comments on commit bddc5b4

Please sign in to comment.