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

Don't abort build when there are checkstyle violations #3006

Merged
merged 1 commit into from
Jul 13, 2017

Conversation

LinusDietz
Copy link
Member

Upon wish of @lenhard, nothing more to say here

@LinusDietz LinusDietz added build-system type: code-quality Issues related to code or architecture decisions status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers labels Jul 13, 2017
Copy link
Member

@tobiasdiez tobiasdiez left a comment

Choose a reason for hiding this comment

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

Strongly approved!

@koppor
Copy link
Member

koppor commented Jul 13, 2017

Why?

This improves our code quality. If not the author, who else will clean up the code?

Which checkstyle rules are annoying?

We all know (do we?) that JabRef's code was (and still is) a mess (at some places). I strongly believe that checkstyle rules are one solution to the problem.

@koppor koppor merged commit 52f4672 into master Jul 13, 2017
@koppor koppor deleted the checkstyle-dont-abort-build branch July 13, 2017 11:04
@koppor
Copy link
Member

koppor commented Jul 13, 2017

I give it a go. If the active developers don't see any value in checkstyle checks, I give it a go.

Refs #2996

@Siedlerchr
Copy link
Member

Well, also I think checkstyle warnings are annoying, they necessary. And it's not much work when you just have to press ctrl+f in eclipse to do it.
The only thing I am not happy about is that sort order of declarations. That could create problems when initializing fields.

@LinusDietz
Copy link
Member Author

LinusDietz commented Jul 13, 2017

Hey @koppor, the intention is not to abolish checkstyle, but to improve the coding experience.

When working on a PR, the most important thing are the unit tests to pass. When executing gradle check it takes 59 secs to only compile the java code and run the checkstyle tests. If there is ANY problem because I didn't hit the code formatter the build will abort at this point and the tests are not executed. (see also #2996 (comment)) That's why suggested to make them optional. Of course they should be adhered before merged into master.

In an ideal case they SHOULD fail on travis, but not locally. Does anybody know if that's possible in an elegant way?

@lenhard
Copy link
Member

lenhard commented Jul 13, 2017

If I recall the discussion correctly, then we agreed on the following: The build should execute even if their are checkstyle warnings (so that you get feedback on the tests), but it should still fail. Is this what this PR achieves?

I hate checkstyle and complain all the time, but I concede that the rules improve code quality.

Siedlerchr added a commit that referenced this pull request Jul 15, 2017
* upstream/master: (30 commits)
  Add preference migration for keybdingings (#3007)
  Shutdown previus AutosaveManager and BackupManager during SaveAs  (#2994)
  Run Checkstyle task after Test task (#3010)
  Mark LibraryOfCongressTest as a fetcher test (#3012)
  When browsing through the MainTable remember which EntryEditor tab was open (#3011)
  Improve performance of journal abbreviation loader (#3009)
  Update checkstyle 7.6.1 -> 8.0
  Don't abort build when there are checkstyle violations (#3006)
  Reimplement content selectors (#3003)
  Only do a back up for bigger changes or if a different field is edited (#3004)
  Listen to change events for setting dirty status of database (#3001)
  Fix #2967: MathSciNet tab works again
  Fix #2902: Tab in entry editor moves to next text area
  Fix #2946: external changes are now correctly shown in the entry editor
  Fix #2998: improve auto completion (#3002)
  Fix mac keybinding by replacing ctrl it with meta key (#3000)
  Less backups (#2995)
  [WIP] Complete rework of the auto completion (#2965)
  Eclipse J
  Add switch indentation for Eclipse and add some new missing formatting options
  ...
Siedlerchr added a commit that referenced this pull request Jul 15, 2017
* upstream/master:
  Add preference migration for keybdingings (#3007)
  Shutdown previus AutosaveManager and BackupManager during SaveAs  (#2994)
  Run Checkstyle task after Test task (#3010)
  Mark LibraryOfCongressTest as a fetcher test (#3012)
  When browsing through the MainTable remember which EntryEditor tab was open (#3011)
  Improve performance of journal abbreviation loader (#3009)
  Update checkstyle 7.6.1 -> 8.0
  Don't abort build when there are checkstyle violations (#3006)
  Reimplement content selectors (#3003)
  Only do a back up for bigger changes or if a different field is edited (#3004)
  Listen to change events for setting dirty status of database (#3001)
  Fix #2967: MathSciNet tab works again
  Fix #2902: Tab in entry editor moves to next text area
  Fix #2946: external changes are now correctly shown in the entry editor
  Fix #2998: improve auto completion (#3002)
  Fix mac keybinding by replacing ctrl it with meta key (#3000)
  Less backups (#2995)
  [WIP] Complete rework of the auto completion (#2965)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-system status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers type: code-quality Issues related to code or architecture decisions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants