Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

FUNCSTART and FUNCEND are missing case management #138

Closed
brigittehuynh opened this issue Jul 22, 2018 · 0 comments
Closed

FUNCSTART and FUNCEND are missing case management #138

brigittehuynh opened this issue Jul 22, 2018 · 0 comments
Assignees

Comments

@brigittehuynh
Copy link
Collaborator

Expected behavior

case ... esac can be used as a function body (cf. compound commands, conditional constructs in the Bash manual), so should be taken into account in
FUNCSTART : "case"
and
FUNCEND : "esac"

Actual behavior

The case construct is not taken into account, due to copy of FUNCSTART and FUNCEND from the SH.MET.ComplexitySimplified metric, where case and esac required special treatment

Steps to reproduce behavior

In rules using FUNCSTART and FUNCEND, case and ESAC are missing, apart from COM.NAME.Homonymy, where localization with FUNCSTART and FUNCEND originated

Detection version

3.1.0-alpha.3

@brigittehuynh brigittehuynh self-assigned this Jul 22, 2018
brigittehuynh added a commit that referenced this issue Jul 22, 2018
(including case-esac). Tests updated accordingly.
brigittehuynh added a commit that referenced this issue Jul 22, 2018
taking special care that any other patterns included in the FUNCSTART
and FUNCEND ones were correctly handled. The BEGINFUNC state was also
updated accordingly.
@WaldoFR WaldoFR mentioned this issue Sep 13, 2018
@WaldoFR WaldoFR closed this as completed Sep 14, 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
…e and esac,

taking special care that any other patterns included in the FUNCSTART
and FUNCEND ones were correctly handled. The BEGINFUNC state was also
updated 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
taking special care that any other patterns included in the FUNCSTART
and FUNCEND ones were correctly handled. The BEGINFUNC state was also
updated accordingly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants