Fixing of parsing errors detected in three rules: COM.Inst.Brace, COM.PROJECT.Header, COM.NAME.Homonymy
Implementation of 8 new rules (from EUMETSAT coding standard, but useful in other contexts) to check:
size of files (lines of code) againts a threshold: The rule checks if a program or module exceeds a maximum number of lines of code (excluding comments and blank lines) set at 1000 by default.
size of procedures (lines of code) againts a threshold: The rule checks if a procedure (function or subroutine) exceeds a maximum number of lines of code (excluding comments and blank lines) set at 150 by default.
percentage of comments againts a threshold: The rule checks if a program or module has at least a certain percentage of comments set at 30% by default.
cyclomatic complexity of procedures againts a threshold: The rule checks if a procedure (function or subroutine) exceeds a maximum number of cyclomatic complexity (simplified, not taking goto statements into account) set at 15 by default.
declaration of only one program/module per file: Each file should only contain one program or module. The rule checks if there are several of them in one file.
number of arguments for procedures againts a threshold: The rule checks if a procedure (function or subroutine) has more than a maximum number of arguments or parameters, set at 7 by default.
documentation of variables: The rule checks that the declaration of variables and types is preceded by a comment line that describes its use.
content in headers: The rule checks that headers for modules or programs have, at least, the following components: Unique identification of the program or module, name of the file, author’s name, statement of the Copyright ownership of the code, description of the nature of functions/subroutines in the file
Types of changes
What types of changes does your code introduce to i-Code?
[X] Bugfix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update (if none of the other choices apply)
[X] Lint and unit tests pass locally with my changes
[X] SonarCloud and GitHub Actions tests pass with my changes
[X] I have added tests that prove my fix is effective or that my feature works
[X] I have added necessary documentation (if appropriate)
[X] Any dependent changes have been merged and published in downstream modules
Further comments
The changes implemented were sponsored and agreed with EUMETSAT, based on their needs, but both EUMETSAT and AQCLab consider that these may be useful to other parties, and for that may be considered to be included in the offical development of i-Code.
Proposed changes
Fixing of parsing errors detected in three rules: COM.Inst.Brace, COM.PROJECT.Header, COM.NAME.Homonymy
Implementation of 8 new rules (from EUMETSAT coding standard, but useful in other contexts) to check:
Types of changes
What types of changes does your code introduce to i-Code?
Issues closed by changes
Checklist
Further comments
The changes implemented were sponsored and agreed with EUMETSAT, based on their needs, but both EUMETSAT and AQCLab consider that these may be useful to other parties, and for that may be considered to be included in the offical development of i-Code.