gpt4 book ai didi

java - IntelliJ 命令行编译器

转载 作者:塔克拉玛干 更新时间:2023-11-02 19:19:24 24 4
gpt4 key购买 nike

我正在寻找一种自动收集所有 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com