首页 > 解决方案 > 使用谷歌风格命名约定在 vscode 中 lint c++

问题描述

我正在寻找一种方法来 lint c++ 代码以匹配 google 样式指南命名约定。例如,如果我有

const int lDaysInAWeek = 7; // Bad - should start with a "k"

std::string tableName;   // Bad - mixed case. Variables should be lowercase with underscores.

void OpenFileorDie(); // Bad - functions should start with a capital letter and have a capital letter for each new word

我想在悬停时有曲线和 QuickFix 选项。有没有办法配置 vscode 来帮助我遵守约定?

标签: c++lint

解决方案


推荐阅读