java - vscode 中 java 扩展的 Checkstyle

标签 java visual-studio-code

我正在为一个简单的程序编写一个java文件,并且我正在尝试对其进行格式化以与Google的java风格指南保持一致。我已经下载了 Red Hat 的 checkstyle for java 和 Language support for java 。在 java checkstyle 的文档中,它说你可以:

You can also trigger the command Checkstyle: Set Checkstyle Configuration File to choose the configuration file in the File Explorer. The extension will automatically detect and list the Checkstyle configuration files in your workspace. Besides that, you will also see the two built-in configurations:

Google's Check

Sun's Check

我想知道是否有人确切地知道如何在 vscode 中使用 java 的 checkstyle 并运行命令来配置它以供 google 检查并运行它以格式化它以供 google 检查

存储库链接:https://github.com/jdneo/vscode-checkstyle

最佳答案

没关系,我已经弄清楚了。原来你只需右键单击即可获取命令面板

关于java - vscode 中 java 扩展的 Checkstyle,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58141965/

相关文章:

c - 在 Visual Studio Code 中编译 C 程序时出错

python - Azure Python SDK - 仅在 VS Code 中调试时代码才会失败

java - Spring Security 不会抛出任何异常

java - Spring REST 多个 @RequestBody 参数,可能吗?

java - JSF 服务层

按下按钮后 Android 模拟器不断崩溃

c# - 在路径 "....vscode/extensions/ms-vscode.csharp-0.3.7/coreclr-debug/debugAdapters/OpenDebugAD7.exe."上找不到 DebugAdapter bin 文件夹

java - Java 接口(interface)中的方法是否应该使用或不使用公共(public)访问修饰符来声明?

java - 无法使执行器端点在旧版Spring Boot项目中工作-获取身份验证页面

jquery - Visual Studio Code 在更新后为我的所有 jquery 代码提供错误