如何在 IteliiJ IDEA 的 .editorconfig 檔案中保留 Kotlin 檢查設定,以便我可以通過 git 與團隊共享它們?
確切的設定名稱是:
Editor > Inspections > Kotlin > Style issues > Accessor call that can be replaced with property access syntax
我想更改它的嚴重性級別。
我試著跟隨
- https://www.jetbrains.com/help/rider/Code_Analysis__Code_Inspections.html#list-of-configurable-code-inspections
和
- https://www.jetbrains.com/help/idea/configuring-code-style.html#editorconfig
但沒有運氣。
該設定的 .editorconfig 條目究竟應該是什么樣子,我在哪里可以找到完整的屬性鍵串列?
提前致謝!
uj5u.com熱心網友回復:
檢查與.editorconfig檔案沒有什么共同之處。
編輯器配置
Editorconfig 是關于 Code Style ( Preferences | Editor | Code Style | Kotlin ) 所有的樣式都可以通過這個按鈕匯出:
有太多的選擇來描述它們。這就是為什么出口更容易。一般選項可以在https://editorconfig-specification.readthedocs.io/#supported-pairs找到
Kotlin 檢查
檢查是特定于 IDE 的。并且可以通過此按鈕將它們匯出/匯入到 XML 檔案:

But there is no possibility to export an individual inspection. Instead, you can create a project-wide inspections profile with your team and use it across.
You can share the inspection profile along with the project. Just add this file to your project's VCS: .idea/inspectionProfiles/Project_Default.xml
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/319046.html
