You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reasonable, as in, there is a clear benefit to enabling the check, and the benefit outweighs he cost of fixing the offending code.
Applicable, as in, the check is compatible with our goal of highly performant automotive code. Things like replacing reinterpret_cast by explicit but slow memcpy could fall under 'non applicable' for performance reasons, but should definitely be discussed. Checks for frameworks we are not using should of course be disabled.
Static analysis is a standard practice in industry and helps to enforce clean coding, reduces succeptability to hard-to-catch bugs, and highlights many of the foot-guns C++ has to offer.
Possible approaches
As there are quite many Clang-Tidy checks, which up until now have not been enforced, it is not feasible to enable them all at once for Autoware. Instead, working in a distributed fashion and first fixing, then enforcing checks seems like the most efficient way forward.
The workflow per check could be along these lines:
triage - is the check applicable, reasonable and important?
assignment - an assignee or group of assignees is chosen to work on the check
fix errors - create PRs against offending repos, get them merged
make required - once the check passes on Autoware, make it required in CI
report - Update the list below sothat other collaborators know the status of the rule
Definition of done
The transition is done when all of the below Clang-Tidy checks have either
been made required, or
have been discussed and disabled with a valid reason.
Checklist
Description
Enable as many Clang-Tidy checks as reasonable and applicable to the required Clang-Tidy CI check discussed here:
Reasonable, as in, there is a clear benefit to enabling the check, and the benefit outweighs he cost of fixing the offending code.
Applicable, as in, the check is compatible with our goal of highly performant automotive code. Things like replacing
reinterpret_cast
by explicit but slowmemcpy
could fall under 'non applicable' for performance reasons, but should definitely be discussed. Checks for frameworks we are not using should of course be disabled.Please discuss about checks here:
Purpose
Static analysis is a standard practice in industry and helps to enforce clean coding, reduces succeptability to hard-to-catch bugs, and highlights many of the foot-guns C++ has to offer.
Possible approaches
As there are quite many Clang-Tidy checks, which up until now have not been enforced, it is not feasible to enable them all at once for Autoware. Instead, working in a distributed fashion and first fixing, then enforcing checks seems like the most efficient way forward.
The workflow per check could be along these lines:
Definition of done
The transition is done when all of the below Clang-Tidy checks have either
Accepted Checks (In Progress or Done)
Disabled Checks
Backlog
The text was updated successfully, but these errors were encountered: