Skip to content
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

ktlint: Do NOT use --apply-to-idea-project #23

Merged
merged 2 commits into from
Apr 18, 2019
Merged

ktlint: Do NOT use --apply-to-idea-project #23

merged 2 commits into from
Apr 18, 2019

Conversation

bgrozev
Copy link
Member

@bgrozev bgrozev commented Apr 17, 2019

because it silently overrides the Java code style settings. Do not
run in the mvn validate phase. Use pre-commit hook instead of pre-push.

because it silently overrides the *Java* code style settings. Do not
run in the mvn validate phase. Use pre-commit hook instead of pre-push.
@bgrozev
Copy link
Member Author

bgrozev commented Apr 17, 2019

Don't merge yet, WIP

@bbaldino
Copy link
Member

bbaldino commented Apr 17, 2019 via email

@bgrozev
Copy link
Member Author

bgrozev commented Apr 17, 2019

Yeah, it doesn't seem right. I asked upstream
pinterest/ktlint#378

@bbaldino
Copy link
Member

bbaldino commented Apr 17, 2019 via email

@bgrozev
Copy link
Member Author

bgrozev commented Apr 17, 2019

We can move to the mvn plugin later.

I removed running it as part of the maven workflow, because I use mvn install with 'dirty' code all the time.

Personally I prefer a pre-commit hook (instead of pre-push), otherwise if I only notice when I'm trying to push I might need to rebase to fix earlier commits. But I wouldn't mind having both. I think there must be a way to have them installed automatically on checkout, but I couldn't find out how with a quick seach.

Same applies to the jmt commit PR that I'll open tomorrow

Copy link
Member

@bbaldino bbaldino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wait, did you mean to make the script do the pre commit hook?

@bgrozev
Copy link
Member Author

bgrozev commented Apr 18, 2019

No I left a note in the readme and was going to leave it for later. This doesn't change anything, since one has to manually launch ktlint.sh anyway. I'm adding a task to the board though

@bgrozev bgrozev merged commit 5594150 into master Apr 18, 2019
@bgrozev bgrozev deleted the ktlint-fix branch July 25, 2019 12:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants