5AbhishekSaxena / 5AbhishekSaxena/Timeline
Create custom rule to allow package name with `in` for ktlint.
- 主要语言
- Kotlin
- 星标
- 0
- 派生
- 0
- PR 合并指标
- 30 天内没有已合并 PR
描述
The ktlintCheck fails for the package name.
```kotlin
package `in`.developingdeveloper.timeline
```
**Rule id**: package-name
**Rule documentation**: https://pinterest.github.io/ktlint/rules/standard/#package-name
Currently, to pass the build you can disable the rule itself but it isn't the correct solution but there should be a custom rule which allows the above-mentioned package name to flag the places where the package name is invalid.
Current Solution:
1. Craete a file `.editorconfig` in the root directory.
2. Add the following lines to the file
```
root = true
[*.{kt,kts}]
ktlint_standard_package-name = disabled
```
Reference: https://pinterest.github.io/ktlint/faq/#why-is-editorconfig-property-disabled_rules-deprecated-and-how-do-i-resolve-this
## Detekt
If you are using `detekt` for code smell, please add the following to pass the test.
```yml
naming:
InvalidPackageDeclaration:
active: true
rootPackage: '`in`'
```
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。