BottleBuddy / bottle-buddy-embedded

Bottle Buddy Embedded provides the source code for all the code that lives on the Bottle Buddy device.
0 stars 0 forks source link

Enhance Travis-Ci Lint Job #5

Open j-ka11 opened 4 years ago

j-ka11 commented 4 years ago

Currently, the Lint Job for Travis is a simple check with clang-tidy and default options (which means all rules are evaluated). Since the list of all possible rules is very large, there have already been unnecessary rules that make clang-tidy checks fail. We need to shorten the list of rules that clang-tidy evaluates. Additionally, clang-tidy only checks a narrow area of coding style and coding conventions. To enhance the Lint job, we need improvement in two areas:

  1. Determine clang-tidy rules we don't want to define and add it to the .travis.yml file. Preferably, be conservative when deciding to not follow a rule as this will result in cleaner code in the end.
  2. Research some more linting tools for C/C++ and configure Travis-Ci to use them. We will also need to eventually build whatever new tools we add in the development environment as well so we can know if we will pass their checks without having to push to Github every time. Some potential ideas for other linting tools are C/C++ Advanced Lint, Doxygen, and AStyle
j-ka11 commented 4 years ago

I think it will be a good idea to focus first on shrinking the list of clang-tidy rules used, otherwise we will have to make a lot of unnecessary changes to the code in order to get it through branch protections. Once that is done, we can focus on adding other tools.

j-ka11 commented 4 years ago

A spreadsheet outlining the rules we are using can be found here