Rider 2019.1-从命令行启动代码检查

时间:2019-07-02 09:53:59

标签: unity3d rider code-inspection

我正在尝试通过参考以下链接使用命令行工具运行Rider IDE的代码检查流程:

https://www.jetbrains.com/help/idea/command-line-code-inspector.html

我找不到文档中所述的任何正确“检查路径”。

这是命令语法:

IntelliJ\ IDEA.app/Contents/bin/inspect.sh project-path inspection-path output-path -v2 -d subdirectory-path

这是一个示例调用:

IntelliJ\ IDEA.app/Contents/bin/inspect.sh ~/MyProject ~/MyProject/.idea/inspectionProfiles/Project_Default.xml ~/MyProject/inspection-results-dir -v2 -d ~/MyProject/subdirectory

当我打开项目文件夹下的“ .idea”文件夹时,没有“ inspectionProfiles”文件夹,也没有“ Project_Default.xml”文件作为“ inspection-path”参数传递。

在我项目的“ .idea”文件夹下

".idea/.idea.game-unity/.idea/codeStyles/codeStyleConfig.xml"

当我运行以下命令时:

./inspect.sh /Users/fcoskun/Projects/gameUnity/game-unity /Users/fcoskun/Projects/gameUnity/game-unity/.idea/.idea.game-unity/.idea/codeStyles/codeStyleConfig.xml /Users/fcoskun/Projects/gameUnity/game-unity -v2 -d /Users/fcoskun/Projects/gameUnity/game-unity/Assets/Scripts

我得到的结果是:

2019-07-02 12:54:34.925 rider[22432:35398688] allVms required 1.8*,1.8+
2019-07-02 12:54:34.928 rider[22432:35398694] Value of RIDER_VM_OPTIONS is (null)
2019-07-02 12:54:34.928 rider[22432:35398694] fullFileName is: /Applications/Rider.app/Contents/bin/rider.vmoptions
2019-07-02 12:54:34.928 rider[22432:35398694] fullFileName exists: /Applications/Rider.app/Contents/bin/rider.vmoptions
2019-07-02 12:54:34.928 rider[22432:35398694] Processing VMOptions file at /Applications/Rider.app/Contents/bin/rider.vmoptions
2019-07-02 12:54:34.929 rider[22432:35398694] Done



Installation home directory: file:////Applications/Rider.app/Contents
System directory: file:////Users/fcoskun/Library/Caches/Rider2019.1
Config directory: file:////Users/fcoskun/Library/Preferences/Rider2019.1
Log directory: file:////Users/fcoskun/Library/Logs/Rider2019.1

Following output will be written to a log file /Users/fcoskun/Library/Logs/Rider2019.1/frontend.log

在frontend.log文件中,存在有关InspectionApplication的NullPointerException:

12:54:42.572 | ERROR | InspectionApplication          | null
java.lang.NullPointerException
    at com.intellij.openapi.ui.impl.DialogWrapperPeerImpl.show(DialogWrapperPeerImpl.java:430)
    at com.intellij.openapi.ui.DialogWrapper.invokeShow(DialogWrapper.java:1682)
    at com.intellij.openapi.ui.DialogWrapper.show(DialogWrapper.java:1631)
    at com.jetbrains.rider.projectView.SolutionManager.openDirectoryInteractive(SolutionManager.kt:141)
    at com.jetbrains.rider.projectView.SolutionManager.openDirectoryInteractive$default(SolutionManager.kt:131)
    at com.jetbrains.rider.projectView.ideaInterop.RiderProjectOpenProcessor.a(RiderProjectOpenProcessor.kt:44)
    at com.jetbrains.rider.projectView.ideaInterop.RiderProjectOpenProcessor.doOpenProject(RiderProjectOpenProcessor.kt:37)
....
....

有人可以帮助我吗?我应该如何调用该inspect.sh脚本?

1 个答案:

答案 0 :(得分:0)