-
Notifications
You must be signed in to change notification settings - Fork 2.7k
[POC] editorconfig-maven-plugin
: implement IDE agnostic configuration
#2321
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
Conversation
editorconfig.org
assuming our project dont require spiked line endings like PMD and Check to pass build.
|
17771cd
to
ff92b84
Compare
editorconfig.org
editorconfig-maven-plugin
: implement IDE agnostic configuration
.editorconfig
Outdated
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_style = space | ||
insert_final_newline = true | ||
|
||
[*.java] | ||
ij_continuation_indent_size = 4 | ||
ij_java_class_count_to_use_import_on_demand = 999 | ||
ij_java_names_count_to_use_import_on_demand = 999 | ||
indent_size = 4 | ||
max_line_length = 120 | ||
|
||
[*.xml] | ||
max_line_length = 160 |
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.
Which one is not covered by spotless or checkstyle ... do we really need next tool
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.
[*.java] | ||
ij_continuation_indent_size = 4 | ||
ij_java_class_count_to_use_import_on_demand = 999 | ||
ij_java_names_count_to_use_import_on_demand = 999 |
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.
maybe only the imports, as everything else is covered by spot.
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.
imports with asterix are forbidden be checkstyle
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.
yes but they will still happen. We need out of the box solution follow convention over config. ATM we have to config by hand this is the automat for whole world.
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.
intellij default is using * when having more then 5 imports. https://en.wikipedia.org/wiki/Convention_over_configuration
we have broken the contract therefore need to fix up again.
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.
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf |
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.
could merge without this. Try activating, then you see much files broken. preventing more. ATM dev setup seems broken, as not configured properly: https://dev.to/kevinshu/git-and-normalization-of-line-endings-228j
end_of_line = lf | |
#end_of_line = lf |
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.
need rewrite recipe for this
other stuff comes from spot and is kind of DRY only import count is real benefit.
rival/addition to
Checkstyle violations
#2300rewrite-maven-plugin
: Introduce OpenRewrite by Moderne #2322assuming maven project dont require spiked line endings like PMD and Check to pass build.
items:
violates insert_final_newline = true
ref:
editorconfig.org
checkstyle/checkstyle#16574