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

[Git][lintian/lintian][master] 3 commits: Add *~ to .gitignore



Title: GitLab

Axel Beckert pushed to branch master at lintian / lintian

Commits:

  • 5bffcd9a
    by Richard Lewis at 2024-02-05T00:50:58+00:00
    Add *~ to .gitignore
    
  • 40f26ce4
    by Richard Lewis at 2024-02-05T00:50:58+00:00
    Add test that demonstrates bug #1019690
    
    lintian exits with code 2 when --show-overrides is given and an error is fixed.
    The test added will fail: the next commit will fix lintian so it passes.
    
  • 372ac9c8
    by Richard Lewis at 2024-02-05T00:50:58+00:00
    Fix exit code when --show-overrides is given and an 'error' tag is overridden
    
    Previously, if an error tag was overridden but --show-overrides was given,
    lintian would correctly override the tag, but incorrectly give an exit
    code of 2.
    
    The reason is a logic error in lib/Lintian/Pool.pm in the code from lines 173-212
    
    The whole block seems to be attempting to:
    - skip hints (tags) that should not be displayed (experimental, or at a too-low display-level)
    - count number of errors/warnings that remain (used in line 217 to set exit code)
    - keep hints that should be displayed (line 211)
    
    Because on line 194, if an 'error' tag is overridden and --show-overrides is given the block
    decided not to call next (because keeping the hint doesnt happen until line 211).
    
    But then line 197 is executed which means that the hint is counted as a warning/error/etc whenever
    show-overrides was present: effectively show-overrides makes it look like no override was present.
    
    (And then on line 217 the exit_code will be set to 2).
    
    This patch therefore changes 197 to only run the sub-block if an override was not defined.
    

8 changed files:

Changes:

  • .gitignore
    ... ... @@ -17,6 +17,7 @@
    17 17
     /.idea/
    
    18 18
     /.nobackup
    
    19 19
     *.bak
    
    20
    +*~
    
    20 21
     *.rej
    
    21 22
     cover_db*
    
    22 23
     /coverage-report
    

  • lib/Lintian/Pool.pm
    ... ... @@ -191,8 +191,7 @@ sub process{
    191 191
                     next
    
    192 192
                       unless $PROFILE->display_level_for_tag($hint->tag_name);
    
    193 193
     
    
    194
    -                if (!defined $hint->override
    
    195
    -                    || $option->{'show-overrides'}) {
    
    194
    +                if (!defined $hint->override) {
    
    196 195
     
    
    197 196
                         ++$reported_count{$tag->visibility}
    
    198 197
                           if !$tag->experimental;
    

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/build-spec/debian/install
    1
    +file /usr/share/file

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/build-spec/debian/lintian-overrides
    1
    +# package installs a d/rules template not a script
    
    2
    +missing-dep-for-interpreter /usr/bin/make *

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/build-spec/fill-values
    1
    +Skeleton: upload-native
    
    2
    +Testname: show-overrides-exit-status
    
    3
    +Description: Bug #1019690 correct exit status when show-overrides

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/build-spec/orig/file
    1
    +#!/usr/bin/make -f
    
    2
    +
    
    3
    +%:
    
    4
    +	dh $@ --with elpa

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/eval/desc
    1
    +Testname: show-overrides-exit-status
    
    2
    +Check: scripts
    
    3
    +Exit-Status: 0
    
    4
    +Match-Strategy: literal
    
    5
    +Output-Format: EWI
    
    6
    +Default-Lintian-Options: --show-overrides --fail-on error

  • t/recipes/lintian-features/exit-status/show-overrides-exit-status/eval/literal
    1
    +N: package installs a d/rules template not a script
    
    2
    +O: show-overrides-exit-status: missing-dep-for-interpreter /usr/bin/make (does not satisfy make:any | build-essential:any | dpkg-dev:any) [usr/share/file/file]


  • Reply to: