Open
Description
The Code rules (http://cms-sw.github.io/cms_coding_rules.html) would benefit from some updates (list has been updated based on the discussion below)
- The links in the Table of Contents are broken (they have
--
too much) - Links to C++ Core Guidelines could updated to point to http://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines instead of https://github.com/isocpp/CppCoreGuidelines
- Add SF.7: Don’t write using namespace at global scope in a header file from the C++ Core Guidelines under Section 7. (spurred by Addition of L1 tracking code for "TMTT" & (part of) "Hybrid" algorithms (L1Trigger/TrackFindingTMTT) cmssw#29381 (comment))
- Add "Use
std::abs()
instead offabs()
" - Add "Use C++ headers, e.g.
#include <cmath>
instead of#include math.h
" - Add "Do not use
cout
orcerr
, use e.g. MessageLogger instead" - Add "Use git versioning to retain old versions of code in the development history, rather than leaving commented-out code in files. if code is only commented out temporarily, a clear comment should be added describing why it's temporarily disabled and under what conditions it will be re-enabled."
- Add "Avoid
const_cast
" - Relax 4.4. "Do not inline virtual functions." to "Do not inline virtual functions. (*) Allowed exception: inlining is permitted for simple functions like accessors and setters, as long as there is at least one non-inline virtual function in the class."
- Add "Avoid
thread_local
"
Metadata
Metadata
Assignees
Labels
No labels