-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add linting #1137
Add linting #1137
Conversation
a7ee7e0
to
dc6f759
Compare
dc6f759
to
b021124
Compare
infix fun <TargetID: Comparable<TargetID>, Target: Entity<TargetID>, REF:Comparable<REF>> EntityClass<TargetID, Target>.optionalBackReferencedOn(column: Column<REF>) | ||
= registerRefRule(column) { OptionalBackReference<TargetID, Target, ID, Entity<ID>, REF>(column as Column<REF?>, this) } | ||
infix fun <TargetID : Comparable<TargetID>, Target : Entity<TargetID>, REF : Comparable<REF>> EntityClass<TargetID, Target>.optionalBackReferencedOn(column: Column<REF>) = | ||
registerRefRule(column) { OptionalBackReference<TargetID, Target, ID, Entity<ID>, REF>(column as Column<REF?>, this) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Tapac these were the only changes I had to make manually, the linter did not like moving the =
sign to the previous line. Ideally in this case I would use brackets and return
, but the list of generics is long and it is useful to have them computed transparently in this case.
b021124
to
e418d8a
Compare
@Tapac just updated this branch. |
How about adding this to the CI? |
@hfhbd 99% certain that the plugin adds |
Your PR was squashed to master manually, so I'll close the PR. |
Why did you use kotliner? why not https://github.com/arturbosch/detekt/? |
Kotlinter is a gradle plugin wrapper for ktlint. I've used it before, it's easy and works well. Please submit a PR if you think the project could benefit from using detekt. 🙂 |
I've added
org.jmailen.kotlinter
plugin, which is my go-toktlint
plugin forgradle
(org.jlleitschuh.gradle.ktlint
usesgradle
features that are being deprecated in 7.0). The only manual changes are found in the rootbuild.gradle.kts
and.editorconfig
. The rest of the changes are autogenerated using the linter.The linter is executed using
./gradlew lintKotlin
to check styling, and./gradlew formatKotlin
to auto-correct styling.