Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用的 C++ 代码很高兴地使用“头文件不需要扩展”规则。在包含这些文件的目录上使用 cscope 和 sloccount 等工具时,这让我很头疼,因为这些工具忽略了无扩展名的文件。
有谁知道避免这种情况的方法(重命名文件或放置符号链接等)?
只需重命名文件以使用正常约定,这样未来的维护者就不会为试图找出代码在哪里而头疼。无扩展标准包含文件应被视为例外而不是要遵循的规则,因为该标准甚至不保证它们对应于物理文件。