[SERVER-43936] Replace cpplint.py Created: 10/Oct/19  Updated: 29/Oct/23  Resolved: 29/Oct/19

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 4.3.1

Type: Improvement Priority: Major - P3
Reporter: Andrew Morrow (Inactive) Assignee: Mark Benvenuto
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-71742 Move volatile keyword lint to clang-tidy Closed
is related to SERVER-71743 Move polyfill lint to clang-tidy Closed
is related to SERVER-71744 Move atomic, mutex and nomongo assert... Closed
is related to SERVER-71746 Move mongo config header lint to clan... Closed
Backwards Compatibility: Fully Compatible
Sprint: Security 2019-11-04
Participants:

 Description   

A recent analysis of lint results showed that the cpplint.py portion of our lint task finds only three classes of issues:

  • Lack of terminal newlines in files
  • Missing copyright headers
  • Use of banned types, an extension that we added to cpplint.py

What cpplint.py isn't doing is telling us anything interesting about C++. And, now that we have clang-tidy available per SERVER-27984, we have a better C++ linter in play anyway, we find that cpplint.py takes a lot of time in the lint task but tells us little of interest.

We should write a new tool that can live in the same ecosystem as clang-format and pylint that enforces only the last two items above. It will need to honor NOLINT I expect.

Later, we should extend clang-tidy to enforce the rules that we want.



 Comments   
Comment by Mark Benvenuto [ 29/Oct/19 ]

Removed in https://github.com/mongodb/mongo/commit/1e23641536f0b2e3632e11e40e35bf017b4f5e64

Comment by Githook User [ 25/Oct/19 ]

Author:

{'name': 'Mark Benvenuto', 'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com'}

Message: SERVER-43936 Implement simpler, quicker python based C++ linter
Branch: master
https://github.com/mongodb/mongo/commit/a54df9e45d85a670bc4dc40339d76347865fab69

Comment by Githook User [ 25/Oct/19 ]

Author:

{'username': 'markbenvenuto', 'email': 'mark.benvenuto@mongodb.com', 'name': 'Mark Benvenuto'}

Message: SERVER-43936 Fix license headers
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/aaed013d8d75aa53ea8c967656f59eb9eb822be9

Generated at Thu Feb 08 05:04:31 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.