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

Modified behaviour for several rules with FNAME #137

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

Modified behaviour for several rules with FNAME #137

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

Comments

@brigittehuynh
Copy link
Collaborator

Expected behavior

Using FNAME in FUNCT instead of VAR should not change the expected behaviour of the rule

Actual behavior

When using FNAME, the rules failed their automatic tests, either just on one on on both the tests.

Steps to reproduce behavior

Replace the FUNCT definition using VAR with the one using FNAME, change VAR to FNAME in the naming state (can be found in most rules).
The following rules are the ones concerned with the issue:
COM.FLOW.Recursion
COM.INST.CodeComment
COM.INST.Line
COM.PRES.Indent
SH.MET.PipeLine
SH.FLOW.CheckCodeReturn

Detection version

3.1.0-dev

brigittehuynh added a commit that referenced this issue Jul 22, 2018
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
brigittehuynh added a commit that referenced this issue Jul 22, 2018
remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
brigittehuynh added a commit that referenced this issue Jul 22, 2018
(including case-esac). Tests updated accordingly.
Issue #137 remains valid).
brigittehuynh added a commit that referenced this issue Jul 23, 2018
failing after introducing FNAME. The issue was solved by removing \space
from the SPACE token.
@brigittehuynh
Copy link
Collaborator Author

COM.TYPE.Expression had the same problem. It was solved by removing the \space in the SPACE token. This might be the cause of the modified behaviour of the other rules, that also use SPACE in other tokens.
Why \space changes the behaviour should be looked into.

@brigittehuynh brigittehuynh self-assigned this Jul 23, 2018
brigittehuynh added a commit that referenced this issue Sep 12, 2018
@brigittehuynh
Copy link
Collaborator Author

COM.FLOW.Recursion no longer needed to take FNAME into account in the scope of this issue as it had been localized since raising this issue, and it was already done.

\space was at the root of the issue: \space contains \n, causing rules to detect SPACE (containing \space) in unwanted places.
\space should be removed from the other rules as a precaution as it is likely to cause issues.

brigittehuynh added a commit that referenced this issue Sep 13, 2018
(overlooked in previous treatment of the issue)
@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
…scatlab#137 remains

valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…tion (issue cnescatlab#137

remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
… localization

(including case-esac). Tests updated accordingly.
Issue cnescatlab#137 remains valid).
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…e automatic tests were

failing after introducing FNAME. The issue was solved by removing \space
from the SPACE token.
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…viour for

remaining rules not yet having FNAME
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
begarco pushed a commit to begarco/i-CodeCNES that referenced this issue Jan 25, 2020
…l rules

(overlooked in previous treatment of the issue)
begarco pushed a commit that referenced this issue Feb 2, 2020
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit that referenced this issue Feb 2, 2020
remains
valid), tests updated accordingly.
Updated extra test file that had CR+LF Windows style end of lines and
could not be analyzed by i-Code.
begarco pushed a commit that referenced this issue Feb 2, 2020
(including case-esac). Tests updated accordingly.
Issue #137 remains valid).
begarco pushed a commit that referenced this issue Feb 2, 2020
failing after introducing FNAME. The issue was solved by removing \space
from the SPACE token.
begarco pushed a commit that referenced this issue Feb 2, 2020
begarco pushed a commit that referenced this issue Feb 2, 2020
(overlooked in previous treatment of the issue)
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