java - IntelliJ 命令行编译器

标签 java command-line intellij-idea compiler-warnings headless

我正在寻找一种自动收集所有 IntelliJ 静态代码分析警告(编译器和检查)的方法,而无需运行 UI 并单击按钮。理想情况下,我想从命令行运行 IntelliJ 编译器并将所有警告记录到一个文件中。这可能吗?

最佳答案

取自Working with IntelliJ IDEA Features from Command Line :

To launch a code inspection from the command line, specify the following command line arguments:

  1. Path to the launcher: specify the full path to one of the following launchers (which reside under the bin directory of your IntelliJ IDEA installation):
    • For Windows: inspect.bat
    • For UNIX : inspect.sh
  2. Project file path is the full path to the *.ipr file or .idea directory of the project to be inspected.
  3. Inspection profile path is the full path to the profile, against which the project should be inspected. The inspection profiles are stored under USER_HOME\.IntelliJ IDEAXX\config\inspection
  4. Output path is the full path to an existing directory where the report will be stored.
  5. Options. You can specify: The directory to be inspected -d The verbosity level of output -vX, where X is 0 for quiet, 1 for noisy and 2 for extra noisy.

Please note that you have to specify full paths, relative paths are not accepted.

关于java - IntelliJ 命令行编译器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30622865/

相关文章:

maven-2 - 为什么 IntelliJ 没有添加 Maven 目标?

xml - 如何在 IntelliJ IDEA 中禁用没有模式的文件的 XML 验证

java - WeakHashMap 随机清除

python - 如何使用 python 可靠地解析命令 zpool status 和 zpool list 的输出,然后将所有信息插入 mysql 数据库?

windows - 如何在git bash下更改目录

windows - Groovy:在命令行参数中使用&符号

intellij-idea - 莱宁根 > 2.8.1 和草书?

java - Junit AWS EC2 测试

java - 在数据库和 Hibernate 映射文件和 POJO 之间同步

java - java中MySqlDB中的图像添加水印