@@ -2775,10 +2775,12 @@ describe('runLint', () => {
27752775 expect ( report ) . toMatchObject ( { checked : 1 , valid : 1 , issues : [ ] } ) ;
27762776 } ) ;
27772777
2778- it ( 'a JSONL file reports each bad line with its line number' , async ( ) => {
2778+ it ( 'a JSONL file reports each bad line with its PHYSICAL line number (blank lines skipped, not renumbered) ' , async ( ) => {
27792779 const dir = mkdtempSync ( join ( tmpdir ( ) , 'cli-lint-jsonl-' ) ) ;
27802780 const file = join ( dir , 'plans.jsonl' ) ;
2781- writeFileSync ( file , `${ VALID_PLAN } \nnot json at all\n${ INVALID_PLAN } \n` , 'utf8' ) ;
2781+ // A blank separator line sits between entries: line 1 valid, line 2 blank,
2782+ // line 3 bad JSON, line 4 invalid plan. Reported numbers must be 3 and 4.
2783+ writeFileSync ( file , `${ VALID_PLAN } \n\nnot json at all\n${ INVALID_PLAN } \n` , 'utf8' ) ;
27822784 const out : string [ ] = [ ] ;
27832785 const rejection = await runLint (
27842786 { profile : 'default' , output : 'json' , debug : false , plans : file } ,
@@ -2787,8 +2789,10 @@ describe('runLint', () => {
27872789 expect ( rejection ) . toMatchObject ( { exitCode : 5 } ) ;
27882790 const report = JSON . parse ( out . join ( '' ) ) as { checked : number ; issues : Array < { file : string } > } ;
27892791 expect ( report . checked ) . toBe ( 3 ) ;
2790- expect ( report . issues . some ( issue => issue . file . endsWith ( ':2' ) ) ) . toBe ( true ) ;
27912792 expect ( report . issues . some ( issue => issue . file . endsWith ( ':3' ) ) ) . toBe ( true ) ;
2793+ expect ( report . issues . some ( issue => issue . file . endsWith ( ':4' ) ) ) . toBe ( true ) ;
2794+ // The blank line itself is not an entry and never reports.
2795+ expect ( report . issues . some ( issue => issue . file . endsWith ( ':2' ) ) ) . toBe ( false ) ;
27922796 } ) ;
27932797
27942798 it ( 'requires exactly one input source' , async ( ) => {
0 commit comments