-
-
Notifications
You must be signed in to change notification settings - Fork 795
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
Automatic reordering of imports for new PRs #1345
Comments
Ok. that PR did produce imports according to the style guide, as far as I could see. So cautious +1 for this. |
I have set up a workflow on the master branch of my fork: master...timo-a:jackson-core:master
You can see a preview here: timo-a#3. Feel free to try out your own dummy PRs on the 3.0 or master branch of my fork. You can also already merge #1347 which adds the workflow to this repository, or discuss further. In the future the workflow can be extended to cover more of the code style, such as collapsing imports, requiring an underscore in front of non public fields and indentation. Moreover there are best practices recipes for sonar qube findings and JUnit/AssertJ. But there is no hurry to add more. ¹ google code suggester seems to struggle with moving a line somewhere else, i.e. removing a line and adding another line somewhere else. That's how it was in the initial change set, a swap of consecutive lines (current version) works. I guess its main goal is to point out code smells that appear on lines that the user has changed and it gets confused when an entire line that the user has added is to be removed entirely. It seems to work fine when just modifying a part of the line, e.g. adding the |
Continuing our conversation in a now closed issue: FasterXML/jackson-databind#4448 (comment)
I believe I can set up a workflow that reorders imports on new PRs.
There are still some kinks to be worked out, but I can already offer a preview: #1344
Let me know if this is the format that you have in mind with the code style.
(I cannot run a preview on the master branch because it does not build right now)My mistake, here is a PR for master: #1346I'll update this issue as I make progress with the actual workflow.
The text was updated successfully, but these errors were encountered: