diff --git a/tools/code-analyzer/src/lib/template-changes.ts b/tools/code-analyzer/src/lib/template-changes.ts index badf9cd50cb..222e706aa20 100644 --- a/tools/code-analyzer/src/lib/template-changes.ts +++ b/tools/code-analyzer/src/lib/template-changes.ts @@ -37,6 +37,7 @@ export const scanForTemplateChanges = async ( ) }).*`; const versionRegex = new RegExp( matchVersion, 'g' ); + const deletedRegex = new RegExp( '^deleted file mode [0-9]+' ); for ( const p in patches ) { const patch = patches[ p ]; @@ -51,9 +52,16 @@ export const scanForTemplateChanges = async ( for ( const l in lines ) { const line = lines[ l ]; + if ( line.match( deletedRegex ) ) { + code = 'notice'; + message = 'Template deleted'; + break; + } + if ( line.match( versionRegex ) ) { code = 'notice'; message = 'Version bump found'; + break; } if ( repositoryPath ) {