-
Notifications
You must be signed in to change notification settings - Fork 49
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
Allow configuration of the .editorconfig file #292
Comments
Hey 👋 Can you elaborate more on your use case? Why the generated file isn't generated under one of "recognized" locations? Doesn't that break IDE integration?
I'm afraid it's not that simple, and it might be even impossible, as it won't be supported by Also, I feel I need to clarify the:
as per: https://editorconfig.org/#file-location:
and that's what To summarize: before taking any further steps, I'd like to first identify the use case for overriding/including additional |
Yeah, as @mateuszkwiecinski points out ktlint has some built in conventions, which align with the editorconfig standard, on where these files are resolved from. Could you generate your editorconfig file to a standard location where it would normally be picked up be editorconfig aware tools such as IDEs and ktlint? |
I suppose I could generate it there then delete it afterwards - not exactly ideal. This design trend is really annoying to me, it should be "convention over configuration", not "convention at the expense of configuration". If I won't go into much detail but my use case is simple enough - the |
Well, I guess it's worth clarifying that kotlinter-gradle does allow some properties to be configured in the gradle file, see here: https://github.com/jeremymailen/kotlinter-gradle#configuration |
I have a similar requirement so I'll describe my use case. We have a lot of different repositories but we want all of them to share the same |
For me the issue is the execution of tasks in a multi-component build. In such an environment I naturally only want one As an example, imagine you have Kotlin code in
will do the right thing and pick up the root
does not pick up the file, probably because, at least with Gradle API measures, you can't know that there is a Gradle project above
So, for me it is very much needed to have some way to configure the |
OK, I looked at the code how the |
I'd like to manually configure which
.editorconfig
file is chosen. I'd like to be able to set it, and I think all that would require is removing theinternal
modifier on this property.One thing this would allow me to do is provide a generated
.editorconfig
file (produced by a separate task). If there's a way to do this already please let me know, but I think that change would be really nice. I can PR it as well if that would help, if this is a change you're willing to make.The text was updated successfully, but these errors were encountered: