question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

New Code Style Proposal

See original GitHub issue

The code style guide we made in 2014 was a step in the right direction, but it didn’t really work out perfectly because I could never get Eclipse and IntelliJ to format the same as each other nor was there a way to format from the command line for people not using those IDEs.

In #2443 , the proposed solution is to use the fmt-maven-plugin plugin, which formats your code using google-java-format, which also has Eclipse and IntelliJ plugins.

If we switch to this system, the diff files will be much easier to read for me, which I’m having to do a lot these days (5+ PRs per day sometimes).

formatting

mvn com.coveo:fmt-maven-plugin:format

Formats your code using google-java-format which follows Google’s code styleguide.

If you want your IDE to stick to the same format, check out the available configuration plugins:

Eclipse

Download google-java-format-eclipse-plugin_*.jar and place in /Applications/Eclipse Java.app/Contents/Eclipse/dropins. Select the plugin in Preferences > Java > Code Style > Formatter > Formatter Implementation. Restart Eclipse.

IntelliJ

In the plugins section in IntelliJ search for google-java-format and install the plugin. Restart IntelliJ.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
IanWorthingtoncommented, Apr 2, 2018

I’d agree with the proposal to permit but not mandate lombok.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Writing a proposal | Google Summer of Code Guides
This program is the Google Summer of Code. ... If the format allows, start your proposal with a short summary, designed to convince...
Read more >
How to Write a Perfect Project Proposal
So don't be surprised if one proposal might be a different length than another or your proposal style changes through each new experience....
Read more >
A proposal for clearer code review | by Mathieu Anderson
A proposal for clearer code review · Source control is a collaboration tool · Prioritizing comments is hard · Levels of concern ·...
Read more >
Guidelines for Code Styling - File Naming - The Turing Way
Style guidelines include advice for file naming, variable naming, use of comments, and whitespace and bracketing. The following are links to existing style...
Read more >
Guidelines for Submitting Unicode® Emoji Proposals
Guidelines for Submitting Unicode® Emoji Proposals. This page describes the process and requirements for submitting a proposal for new emoji characters or ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found