-
Notifications
You must be signed in to change notification settings - Fork 1.2k
.editorconfig #14740
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
base: main
Are you sure you want to change the base?
.editorconfig #14740
Conversation
Complementary to Spotless/tidy
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog-check label to it and you will stop receiving this reminder on future updates to the PR. |
Nice, this would help avoid a bunch of "tidy" commits in my git history! I tried pulling the An alternate would be to change reformatting scope to only uncommitted changes. This can be done via a setting in Intellij but might be easy to miss? |
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.
I'm fine with adding these hints, although I don't use this convention myself so Robert's comments should probably be reviewed and applied first - especially if adding this file may result in corruping certain file types (Makefile).
Oh wait, I thought these changes were coming from the
100% agree. We also don't need to add any extra hints, as long as we have parity with the tidy bot, and reformatting with this config doesn't change existing committed code. |
This PR does not have an entry in lucene/CHANGES.txt. Consider adding one. If the PR doesn't need a changelog entry, then add the skip-changelog-check label to it and you will stop receiving this reminder on future updates to the PR. |
I simplified the glob patterns. I realized my QA was quite flawed because I had the "Google Java Format" IntelliJ plugin installed, which overrides the style settings. I disabled it and spent hours wrestling with IntelliJ's settings to try to get it to match as close as possible. Alas... there remains irreconcilable differences, especially in line wrapping of Javadoc but also in line wrapping of long assignments. This is the best I could do. I updated the Groovy settings to match because of it's syntactical closeness to Java. A reminder: these settings are applied to certain lines of code or files when the user takes certain actions. Yes it can be done automatically on commit but that's opt-in and I'm not sure I'd condone that in a project that uses a non-IDE solution as we do. |
markdown: Tweak line wrap
Are there any concerns with merging this in its current state? It's trimmed down from the original. |
Most of those settings apply to intellij, right? They are not some "standard" .editorconfig things. I'm fine with adding this - if something clashes with other settings, we can always tweak this file's configuration (for example, gradle and groovy files are auto-formatted on #14764). |
Yes; most lines are IntelliJ specific. Thanks for pointing to your recent build work... I'll want to adjust this this configuration to align with the Groovy style from there. |
I plan to merge this tonight (~10pm EST) if I don't hear advise to the contrary. |
please remove the python completely as we already have a python autoformatter and verifier (like spotless, except not slow as hell). We don't need conflicting editor configuration around it. |
I think you're missing a point of the value of this. It's complementary with Spotless (or similar). It helps us write code formatted according to the project's standards during the writing/editing process, especially when utilizing IDE features that manipulate code (e.g. refactorings, perhaps code suggestion completions too). Consequently, forgetting to run tidy/Spotless can be less of an annoyance... pushing more formatting earlier. |
Groovy: don't force wrap
Just FYI - I noticed we already have an editorconfig file in scripts - is this complementary? Could it be moved to the top level as part of this patch? |
OMG that's ironic! @rmuir, you added it (in March), and it only configures Python :-) LOL Okay... well I think that file should be removed and it's python section integrated into the top-level file coming with this PR. As to the very specifics of what it configures, I don't care (whatever you guys say) as Python isn't my thing. |
Complementary to Spotless/tidy
Description
A while back, I imported a "Google Java Style" into my IntelliJ from some internet source and have been using it in my IDE. I exported that to editorconfig format. Then I made some tweaks:
root = true
tab_width
removed as generally redundantinsert_final_newline = true
because spotless.gradle configures this.QA: I told IntelliJ to reformat and optimize imports across all of lucene-core. I saw no changes to java sources, which was correct except for a generated source file.