[SERVER-23468] Linter should ban anonymous namespaces and static variables in headers Created: 01/Apr/16  Updated: 29/Aug/23

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

Type: Improvement Priority: Major - P3
Reporter: Mathias Stearn Assignee: Backlog - Service Architecture
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Service Arch
Participants:

 Description   

They are almost always a mistake. The few cases where we want them can be whitelisted with a NOLINT.



 Comments   
Comment by Alex Neben [ 29/Aug/23 ]

I am sending this to service arch since this would be c++ changes.

Comment by Alex Neben [ 29/Aug/23 ]

I wonder if there is a clang-tidy rule for this? It seems like https://releases.llvm.org/16.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/misc/use-anonymous-namespace.html might be close to what you are asking. Let me know if you think this is correct?

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