iotagent-ul icon indicating copy to clipboard operation
iotagent-ul copied to clipboard

Fiqare secmotic rules

Open fiqare-secmotic opened this issue 5 years ago • 1 comments

This pull request contains improvements made by the Secmotic team for iotagent-ul. These improvements are part of the fiQare project, which is based on ISO 25010 to improve software quality. More info: https://fiqare.eu/

There are two rules:

Rule 1: Unused function parameters should be removed, based on:

  • MISRA C++:2008, 0-1-11 - There shall be no unused parameters (named or unnamed) in nonvirtual functions.
  • MISRA C:2012, 2.7 - There should be no unused parameters in functions
  • CERT, MSC12-C. - Detect and remove code that has no effect or is never executed

Rule 2: if.. else if constructs should end with else clauses, based on:

  • MISRA C:2004, 14.10 - All if...else if constructs shall be terminated with an else clause.
  • MISRA C++:2008, 6-4-2 - All if...else if constructs shall be terminated with an else clause.
  • MISRA C:2012, 15.7 - All if...else if constructs shall be terminated with an else statement
  • CERT, MSC01-C. - Strive for logical completeness
  • CERT, MSC57-J. - Strive for logical completeness

All test in Travis has been passed successfully and the coverage in Coveralls remains the same.

fiqare-secmotic avatar Dec 16 '19 10:12 fiqare-secmotic

After merging PR #415 I'm afraid some merging conflict have arisen in this PR. Fortunatelly, the solution seems easy, detailed by @jason-fox at https://github.com/telefonicaid/iotagent-manager/pull/171#issuecomment-650021937

all you need to do is merge and accept yours

Thereafter

npm i
npm run lint

And fix any es6 errors raised. (Alternatively you could disable the failed rule for your files if necessary)

Sorry for the incoveniences

fgalan avatar Jul 03 '20 12:07 fgalan