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.

Code base doesn't comply with JUnit's own coding style

See original GitHub issue

I’d like to suggest to reformat all code under org.junit.* once to meet the defined formatting guidelines.

At the moment not all the files are formatted accordingly to that standard. This causes problems for contributors - especially in pull request. If you format the code you get a lot of extraneous diffs - just because of the reformatting - in addition to your actual changes.

I think it’s not too late to do this formatting. Regarding existing PRs that tried to preserve the outdated styling: They would get extraneous diffs then of course, but if they apply the new format as well everything would be fine again. In addition, I think many of PRs are dead anyway, since many of them haven’t seen any updates for months or even years.

As a result, contributing to JUnit 4 and reviewing the changes by the core team should become easier in the future.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
Stephan202commented, Jul 24, 2016

A non-Eclipse solution could be to use google-java-format. There’s also a googleformatter-maven-plugin.

0reactions
Stephan202commented, Nov 1, 2016

The google-java-format tool doesn’t support overriding the indentation.

I added a comment on PR #1379; seems four space indentation should be possible after all 😃.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dealing with co-workers who do not have a consistent coding ...
The code I'm talking about is usually technically correct, reasonably structured, and may even be algorithmically elegant, but it just looks ugly. We've...
Read more >
Java Unit Testing with JUnit and TestNG
JUnit (@ http://junit.org/) is an open-source Java Unit Testing Framework designed by Kent Beck, Erich Gamma. It is the de facto standard for...
Read more >
JUnit Tutorial: Setting Up, Writing, and Running Java Unit Tests
JUnit is the most popular Java unit testing framework. An open-source framework, it's used to write and run repeatable automated tests.
Read more >
Learning Natural Coding Conventions
NATURALIZE is descriptive, not prescriptive1: it learns what programmers actually do. When a codebase does not reflect consensus on a convention, ...
Read more >
Google Java Style Guide
This document serves as the complete definition of Google's coding standards for source code in the Java™ Programming Language. A Java source file...
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