@@ -3014,10 +3014,12 @@ describe('runLint', () => {
30143014 expect ( report ) . toMatchObject ( { checked : 1 , valid : 1 , issues : [ ] } ) ;
30153015 } ) ;
30163016
3017- it ( 'a JSONL file reports each bad line with its line number' , async ( ) => {
3017+ it ( 'a JSONL file reports each bad line with its PHYSICAL line number (blank lines skipped, not renumbered) ' , async ( ) => {
30183018 const dir = mkdtempSync ( join ( tmpdir ( ) , 'cli-lint-jsonl-' ) ) ;
30193019 const file = join ( dir , 'plans.jsonl' ) ;
3020- writeFileSync ( file , `${ VALID_PLAN } \nnot json at all\n${ INVALID_PLAN } \n` , 'utf8' ) ;
3020+ // A blank separator line sits between entries: line 1 valid, line 2 blank,
3021+ // line 3 bad JSON, line 4 invalid plan. Reported numbers must be 3 and 4.
3022+ writeFileSync ( file , `${ VALID_PLAN } \n\nnot json at all\n${ INVALID_PLAN } \n` , 'utf8' ) ;
30213023 const out : string [ ] = [ ] ;
30223024 const rejection = await runLint (
30233025 { profile : 'default' , output : 'json' , debug : false , plans : file } ,
@@ -3026,8 +3028,10 @@ describe('runLint', () => {
30263028 expect ( rejection ) . toMatchObject ( { exitCode : 5 } ) ;
30273029 const report = JSON . parse ( out . join ( '' ) ) as { checked : number ; issues : Array < { file : string } > } ;
30283030 expect ( report . checked ) . toBe ( 3 ) ;
3029- expect ( report . issues . some ( issue => issue . file . endsWith ( ':2' ) ) ) . toBe ( true ) ;
30303031 expect ( report . issues . some ( issue => issue . file . endsWith ( ':3' ) ) ) . toBe ( true ) ;
3032+ expect ( report . issues . some ( issue => issue . file . endsWith ( ':4' ) ) ) . toBe ( true ) ;
3033+ // The blank line itself is not an entry and never reports.
3034+ expect ( report . issues . some ( issue => issue . file . endsWith ( ':2' ) ) ) . toBe ( false ) ;
30313035 } ) ;
30323036
30333037 it ( 'requires exactly one input source' , async ( ) => {
0 commit comments