[riot-notifications] [RIOT-OS/RIOT] dist/tools/vera++: add C++ specific tests (#15709)

José Alamos notifications at github.com
Wed Jan 6 11:46:39 CET 2021


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
This commit solves some issues and optimizes the check script in order to run Vera++ only once (instead of twice, one for warnings and one for errors).

In concrete, this PR:
- Adds a "max-line-length-warn" in L004 (Line too long) to warn when line length > 80. This paremeter is configurable from `riot_params.txt`. Note that this warning is only a "puts" command, so it won't make Vera++ return error code
- Modifies T003 (some keywoards should be followed by comma) in order to differentiate between C and C++ keywords. This should solve  https://github.com/RIOT-OS/RIOT/issues/15626
- Removes the first call to Vera++ (for warnings) and remove unused files.
<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure
- Check that Vera++ doesn't show false positives (see https://github.com/RIOT-OS/RIOT/issues/15626)
- Check that the warnings for lines > 100 chars are still shown.
<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references
https://github.com/RIOT-OS/RIOT/issues/15626

_I hope I don't have to touch TCL files again in my whole life_
<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/15709

-- Commit Summary --

  * ci/vera++/rules/T003: do not include C++ keywords in C files
  * ci/vera++/rules/L004: add warning support
  * ci/vera++: run only once

-- File Changes --

    M dist/tools/vera++/check.sh (9)
    M dist/tools/vera++/profiles/riot (40)
    D dist/tools/vera++/profiles/riot_force (47)
    D dist/tools/vera++/profiles/riot_force_params.txt (2)
    M dist/tools/vera++/profiles/riot_params.txt (4)
    M dist/tools/vera++/scripts/rules/L004.tcl (6)
    M dist/tools/vera++/scripts/rules/T003.tcl (30)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/15709.patch
https://github.com/RIOT-OS/RIOT/pull/15709.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/15709
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210106/c9b87957/attachment.htm>


More information about the notifications mailing list