-
-
Notifications
You must be signed in to change notification settings - Fork 360
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
Default KtlintModule to .editorconfig explicitly #3966
Conversation
@@ -32,14 +32,14 @@ trait KtlintModule extends JavaModule { | |||
* Ktlint configuration file. | |||
*/ | |||
def ktlintConfig: T[Option[PathRef]] = Task { | |||
None | |||
Some(PathRef(millSourcePath / ".editorconfig")) | |||
} | |||
|
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.
How about defaulting to Task.workspace / ".editorconfig"
? I'd guess most folks would have the config file at the root of their project (which is what Task.workspace is) rather than in each module's subfolder
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.
This should be an Task.Input
Sounds great. I'm offline now. Feel free to change it now or I'll handle
it tomorrow when I'm up.
…On Fri, Nov 15, 2024, 02:44 Li Haoyi ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In kotlinlib/src/mill/kotlinlib/ktlint/KtlintModule.scala
<#3966 (comment)>:
> @@ -32,14 +32,14 @@ trait KtlintModule extends JavaModule {
* Ktlint configuration file.
*/
def ktlintConfig: T[Option[PathRef]] = Task {
- None
+ Some(PathRef(millSourcePath / ".editorconfig"))
}
How about defaulting to Task.workspace / ".editorconfig"? I'd guess most
folks would have the config file at the root of their project (which is
what Task.workspace is) rather than in each module's subfolder
—
Reply to this email directly, view it on GitHub
<#3966 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAP4ANC66X4X73HRHAHDUEL2ATVRDAVCNFSM6AAAAABRZQHHNSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDIMZWHEZTQNRYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
* [x] Needs #3919 as this builds on it * [x] Update this to use #3961, switching to `KtlintModule` * [x] Needs #3966 to disable ktlint for some files Last change I think needed for #3829 Overview: * Changes `KtfmtModule` to set the error code when there's changes like is true of the other formatters. * Some simplifications were made to the `example/package.mill` based on similarities with Java/Kotlin. * Files were formatted * CI was updated --------- Co-authored-by: Li Haoyi <[email protected]>
For some reason
ktlint
behaves differently if it's config is set vs unset to it's default of.editorconfig
.It seems to be unable to disable
ktlint
when not explicitly set, so I think we should set it instead.Why not bump the version while we're at it?