vscode配置使用 cpplint

标题安装clang-format和cpplint

bash 复制代码
sudo apt-get install clang-format
sudo pip3 install cpplint

标题以下settings.json文件放置xxx/Code/User目录

settings.json

json 复制代码
{
    "sync.forceDownload": false,
    "workbench.sideBar.location": "right",
    "editor.minimap.enabled": false,
    "window.zoomLevel": 2.5,
    "editor.minimap.maxColumn": 150,
    "explorer.confirmDelete": false,
    "extensions.ignoreRecommendations": true,
    "editor.renderWhitespace": "all",
    "security.workspace.trust.untrustedFiles": "open",
    "Lua.telemetry.enable": true,
    "settingsSync.ignoredExtensions": [
        "shan.code-settings-sync"
    ],
    "files.autoSave": "onFocusChange",
    "cpplint.cpplintPath": "/usr/local/bin/cpplint",
    "cpplint.lineLength": 120,
    "cpplint.verbose": 1,
    "cpplint.filters": [
        "-runtime/references,-build/include_subdir,-build/c++11,-build/header_guard,+build/include_what_you_use"
    ],
    "C_Cpp.vcFormat.indent.accessSpecifiers": true,
    "C_Cpp.vcFormat.indent.braces": true,
    "C_Cpp.vcFormat.indent.caseContentsWhenBlock": true,
    "C_Cpp.vcFormat.indent.caseLabels": true,
    "[c]": {
        "editor.formatOnSave": false,
        "editor.quickSuggestions": {
            "comments": false,
            "other": true,
            "strings": false
        },
        "editor.tabSize": 2
    },
    "[cpp]": {
        "editor.formatOnSave": false,
        "editor.tabSize": 2,
        "editor.defaultFormatter": "ms-vscode.cpptools"
    },
    "cmake.configureOnEdit": false,
    "cmake.configureOnOpen": false,
    "C/C++ Include Guard.Comment Style": "Line",
    "C/C++ Include Guard.Macro Type": "Filepath",
    "C/C++ Include Guard.Remove Extension": false,
    "C/C++ Include Guard.Suffix": "_",
    "files.insertFinalNewline": true,
    "files.trimFinalNewlines": true,
    "files.trimTrailingWhitespace": true,
    "C/C++ Include Guard.File Path Pascal Case to Snake Case": true,
    "files.refactoring.autoSave": false,
    "C/C++ Include Guard.Auto Update Include Guard": false,
    "editor.accessibilitySupport": "on",
    "editor.tabSize": 2,
    "vscodeGoogleTranslate.preferredLanguage": "Chinese (Simplified)",
    "gitlens.graph.showGhostRefsOnRowHover": false,
    "gitlens.graph.highlightRowsOnRefHover": false,
    "gitlens.graph.statusBar.enabled": false,
    "gitlens.showWelcomeOnInstall": false,
    "gitlens.showWhatsNewAfterUpgrades": false,
    "gitlens.hovers.pullRequests.enabled": false,
    "workbench.editor.enablePreview": false,
    "C_Cpp.clang_format_path": "/usr/bin/clang-format",
    "C_Cpp.formatting": "clangFormat",
    "prettier.embeddedLanguageFormatting": "off",
    "C_Cpp.clang_format_sortIncludes": true,
    "C_Cpp.clang_format_style": "{ BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AllowShortFunctionsOnASingleLine: false}",
    "editor.rulers": [
        120
    ],
    "C_Cpp.clang_format_fallbackStyle": "{ BasedOnStyle: Google, IndentWidth: 2, ColumnLimit: 120, AllowShortFunctionsOnASingleLine: false}",
    "explorer.compactFolders": false,
    "outline.icons": false,
    "explorer.excludeGitIgnore": true,
    "[python]": {
        "editor.formatOnType": true
    },
    "git.ignoredRepositories": [
        "*build/*"
    ],
    "git.repositoryScanIgnoredFolders": [
        "node_modules",
        "build/*"
    ],
    "C_Cpp.files.exclude": {
        "**/.vscode": true,
        "**/.vs": true,
        "build/**": true,
        "thirdparty/**": true,
        "3dparty/**": true,
    },
    "RainbowBrackets.depreciation-notice": false,
    "editor.inlineSuggest.enabled": true
}
相关推荐
lucky九年17 分钟前
vscode翻译插件
ide·vscode·编辑器
帅得不敢出门34 分钟前
Gradle命令编译Android Studio工程项目并签名
android·ide·android studio·gradlew
ZHOUPUYU1 小时前
IntelliJ IDEA超详细下载安装教程(附安装包)
java·ide·intellij-idea
真·Wild·攻城狮1 小时前
【码农日常】Vscode Clangd初始化失败(Win10)
ide·vscode·编辑器
小堇不是码农1 小时前
在VScode中配置C_C++环境
c语言·c++·vscode
七灵微1 小时前
【测试】【Debug】vscode中同一个测试用例出现重复
ide·vscode·编辑器
哇咔咔哇咔15 小时前
使用Markdown编写适用于GitHub的README.md文件的目录结构
vscode·markdown
Rverdoser16 小时前
Android Studio 多工程公用module引用
android·ide·android studio
4U24717 小时前
Linux入门之vim
linux·编辑器·vim·命令模式·底行模式
free_girl_fang19 小时前
高效作业之Mybatis缓存
java·ide·缓存·mybatis