[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Git][lintian/lintian][master] Numerify line position in item pointers before generating JSON.



Title: GitLab

Felix Lechner pushed to branch master at lintian / lintian

Commits:

1 changed file:

Changes:

  • lib/Lintian/Output/JSON.pm
    ... ... @@ -198,7 +198,10 @@ sub hintlist {
    198 198
                     $item_dictionary{index} = $item->index->identifier;
    
    199 199
     
    
    200 200
                     $pointer_dictionary{item} = \%item_dictionary;
    
    201
    -                $pointer_dictionary{line_position} = $pointer->position;
    
    201
    +
    
    202
    +                # numerify to force JSON integer
    
    203
    +                # https://metacpan.org/pod/JSON::XS#simple-scalars
    
    204
    +                $pointer_dictionary{line_position} = $pointer->position + 0;
    
    202 205
                 }
    
    203 206
     
    
    204 207
                 $hint_dictionary{pointer} = \%pointer_dictionary;
    


  • Reply to: