unity3d - Rider 2019.1 - 从命令行启动代码检查
问题描述
我正在尝试通过引用以下链接使用命令行工具运行 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 脚本?
解决方案
我认为应该改用 Re# CLT。https://www.jetbrains.com/resharper/features/command-line.html
推荐阅读
- c - 在while循环中多次调用函数
- mysql - 如何按 id 删除 mySQL JSON 列元素,而不是按索引 num
- html - 如何将网格与引导程序一起用于表单(v3)?
- c++ - C++ 部分运行程序,直到我切换到 DOS shell
- python - 将带有光标的小部件移动到另一个布局
- python - 矩形毛刺,不与其余部分一起移动
- sql - 用于 Linux 操作系统的 azure devops 发布管道中的自动化 SQL 部署任务
- r - R:你能在不覆盖数据点的情况下为反应性 ggplot 添加标签吗?
- docusignapi - DocuSign - 嵌入签名后重定向到完成页面
- docker - 一个 Docker 镜像可以有多个摘要吗?