Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>ak-checkNew to Visual Studio Code? Get it now.
ak-check

ak-check

Jerry Chen

|
764 installs
| (0) | Free
A c/cpp check language server
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AK CHECK Plug-In

描述

Ak-Check 是一个利用 cpplint、cppcheck 进行代码检查的插件工具;

依赖项

  • python 或 python3:https://www.python.org/
  • cpplint:https://pypi.org/project/cpplint/
  • cppcheck:http://cppcheck.net/

最终确保可以在 linux shell、powershell 输入 python(或 python3)、cpplint、cppcheck 能执行相应命令;

如何工作

设置配置文件

设置 .vscode/settings.json 如下:

  • akCheckServer.cpplintDisable:关闭实时 cpplint 检查,对右键菜单无影响;
  • akCheckServer.cppcheckDisable:关闭实时 cppcheck 检查,对右键菜单无影响;
  • akCheckServer.cpplintConfig:cpplint 的工作配置;
  • akCheckServer.cppcheckConfig:cppcheck 的工作配置;
{
    "akCheckServer.cpplintDisable": false,
    "akCheckServer.cppcheckDisable": false,
    "akCheckServer.cppcheckConfig": "--enable=warning,style,performance,portability --suppress=shiftNegativeLHS --suppress=useStlAlgorithm --suppress=allocaCalled --suppress=shiftTooManyBitsSigned",
    "akCheckServer.cpplintConfig": "--filter=-build/c++11,-build/include_alpha,+build/include_order,-build/include_what_you_use,-readability/todo,-build/header_guard,+runtime/printf,+runtime/printf_format,-runtime/int --linelength=100 --includeorder=standardcfirst --extensions=cxx,cc,h,hpp,cpp"
}

工作方式

  1. 打开、保存 c/cpp 文件时自动检查,会在问题行显示波浪号;
  2. 在资源管理器面板右键文件夹或文件菜单项 “Ak-Check C/C++ files”,会将检查结果放到输出面板的 "CHECK-cpplint"、"CHECK-cppcheck" 面板中;
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft