@@ -102,10 +102,7 @@ const computeRange = (
102102 }
103103
104104 const defaultBranchOf = ( remoteName : string ) : string => {
105- const sym = git (
106- 'symbolic-ref' ,
107- `refs/remotes/${ remoteName } /HEAD` ,
108- ) . trim ( )
105+ const sym = git ( 'symbolic-ref' , `refs/remotes/${ remoteName } /HEAD` ) . trim ( )
109106 if ( sym ) {
110107 return sym . replace ( `refs/remotes/${ remoteName } /` , '' )
111108 }
@@ -172,9 +169,7 @@ const scanCommitMessages = (range: string): number => {
172169 }
173170 if ( errors > 0 ) {
174171 out ( '' )
175- out (
176- 'These commits were likely created with --no-verify, bypassing the' ,
177- )
172+ out ( 'These commits were likely created with --no-verify, bypassing the' )
178173 out ( 'commit-msg hook that strips AI attribution.' )
179174 out ( '' )
180175 const rangeBase = range . split ( '..' ) [ 0 ]
@@ -246,36 +241,28 @@ const scanFilesInRange = (range: string): number => {
246241 const pathHits = scanPersonalPaths ( text )
247242 if ( pathHits . length > 0 ) {
248243 out ( red ( `✗ BLOCKED: Hardcoded personal path found in: ${ file } ` ) )
249- pathHits
250- . slice ( 0 , 3 )
251- . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
244+ pathHits . slice ( 0 , 3 ) . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
252245 errors ++
253246 }
254247
255248 const apiHits = scanSocketApiKeys ( text )
256249 if ( apiHits . length > 0 ) {
257250 out ( red ( `✗ BLOCKED: Real API key detected in: ${ file } ` ) )
258- apiHits
259- . slice ( 0 , 3 )
260- . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
251+ apiHits . slice ( 0 , 3 ) . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
261252 errors ++
262253 }
263254
264255 const awsHits = scanAwsKeys ( text )
265256 if ( awsHits . length > 0 ) {
266257 out ( red ( `✗ BLOCKED: Potential AWS credentials found in: ${ file } ` ) )
267- awsHits
268- . slice ( 0 , 3 )
269- . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
258+ awsHits . slice ( 0 , 3 ) . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
270259 errors ++
271260 }
272261
273262 const ghHits = scanGitHubTokens ( text )
274263 if ( ghHits . length > 0 ) {
275264 out ( red ( `✗ BLOCKED: Potential GitHub token found in: ${ file } ` ) )
276- ghHits
277- . slice ( 0 , 3 )
278- . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
265+ ghHits . slice ( 0 , 3 ) . forEach ( h => out ( `${ h . lineNumber } :${ h . line . trim ( ) } ` ) )
279266 errors ++
280267 }
281268
0 commit comments