Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

COM.INST.BoolNegation #117

Closed
3 of 5 tasks
WaldoFR opened this issue Jun 14, 2018 · 1 comment · Fixed by #156
Closed
3 of 5 tasks

COM.INST.BoolNegation #117

WaldoFR opened this issue Jun 14, 2018 · 1 comment · Fixed by #156

Comments

@WaldoFR
Copy link

WaldoFR commented Jun 14, 2018

Implementation of the rule COM.INST.BoolNegation

Description

Using double negation on boolean expression is forbidden.

Known problems

False positives

Some of them are outside test :
Code example 1 : debug ${!F}_${!L} "----------------> BEGIN: existsAndNotEmpty $item"
Code example 2 : debug ${!F}_${!L} $(ls ${reportsDir})

Some others are inside it :
Code : if [ ! -r "$1" -o ! -f "$1" ]

  • Fix status

Function declaration

Description : The checker is not handling some types of functions declaration. The problem is the same one as defined for several rules in #49 .

  • Fix status

State of the implementation

  • Violation raising
  • Localization
  • Unit tests
@WaldoFR WaldoFR assigned WaldoFR and unassigned WaldoFR Jun 14, 2018
@WaldoFR WaldoFR added this to the Version 3.1.0-alpha.5 milestone Jun 19, 2018
brigittehuynh added a commit that referenced this issue Jul 22, 2018
(including case-esac). Tests updated accordingly.
@brigittehuynh
Copy link
Collaborator

The if [ ! -r "$1" -o ! -f "$1" ] test is correctly analyzed with no false positives with the current version of the rule.

brigittehuynh added a commit that referenced this issue Aug 21, 2018
@WaldoFR WaldoFR mentioned this issue Sep 13, 2018
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…on rule, with localization

(including case-esac). Tests updated accordingly.
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…tside tests)

and updated test file accordingly
begarco pushed a commit that referenced this issue Feb 2, 2020
(including case-esac). Tests updated accordingly.
begarco pushed a commit that referenced this issue Feb 2, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants