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

Add IntelliJ Idea Code Formatting settings for Java Flank #147

Merged
merged 1 commit into from
Mar 23, 2018
Merged

Add IntelliJ Idea Code Formatting settings for Java Flank #147

merged 1 commit into from
Mar 23, 2018

Conversation

doodla
Copy link
Contributor

@doodla doodla commented Mar 23, 2018

This will allow anybody who uses IntelliJ to keep consistent formatting in their PRs.

This is basically Google's style guide taken from here.

Having this PR in will help me ( and others who use IntelliJ ) to avoid weird diffs in future PRs.

@CLAassistant
Copy link

CLAassistant commented Mar 23, 2018

CLA assistant check
All committers have signed the CLA.

@doodla
Copy link
Contributor Author

doodla commented Mar 23, 2018

It looks like there is already some sort of formatting in place. If you can let me know the specifics, I'll modify my PR to match.

@bootstraponline
Copy link
Contributor

We're relying on spotless to enforce Java code style. That's why the Travis CI build is failing.

spotlessJava

Any changes to the style should be made in the spotless configuration. Spotless also has an auto correct mode.

https://github.com/diffplug/spotless

Copy link
Contributor

@bootstraponline bootstraponline left a comment

Choose a reason for hiding this comment

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

Let's figure out how to use spotless instead of adding a dependency on an IDE for formatting. :)

@doodla
Copy link
Contributor Author

doodla commented Mar 23, 2018

@bootstraponline The java formatter plugin was not supported by the latest version of IntelliJ Idea. Google provides their codeStyle settings for IntelliJ Idea though. I've modified my PR to apply Google's code style directly. It does not conflict with spotless in my testing, which would have been... odd.

Also, there seems to be an issue open on spotless to support IntelliJ directly, which has a Jetbrains issue open. diffplug/spotless#200

I think this passes muster.

@bootstraponline
Copy link
Contributor

Awesome. Nice work.

@bootstraponline bootstraponline merged commit 8c634d6 into Flank:master Mar 23, 2018
@doodla doodla deleted the formatting branch March 23, 2018 17:49
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.

3 participants