michaelzangl / minebot

Minebot
GNU General Public License v3.0
144 stars 48 forks source link

Reformat To A Longer Line Length For Readability #157

Closed opticyclic closed 7 years ago

opticyclic commented 7 years ago

In certain parts of the code the line wrapping makes it difficult to read.

A perfect example is this

protected static final Logger LOGGER = LogManager
        .getLogger(AITask.class);

That would be much easier to read if it was one line so your eyes don't have to scan back and forth

protected static final Logger LOGGER = LogManager.getLogger(AITask.class); 

Back in 2011 people were already discussing that the 80 char limit was outdated in eclipse. The consensus there was for 120 chars.

Intellij IDEA also defaults to 120 chars.

Google take a slightly more conservative approach at 100 chars.

Can we check in a code style (maybe a CheckStyle xml so that it works independent of IDE) that specifies a slightly longer line length and then reformat the code?

michaelzangl commented 7 years ago

You can use any line length you like - I simply used the eclipse default of 80 chars. It makes development easier when having multiple files open side to side on one screen, so it has it's pros and cons ;-)

opticyclic commented 7 years ago

OK. Fair enough I just wanted to throw it out there as an option.