Skip to content

Added some additional checkstyle/pmd checks#406

Merged
kaikreuzer merged 1 commit into
openhab:mainfrom
Hilbrand:more_checks
Apr 11, 2021
Merged

Added some additional checkstyle/pmd checks#406
kaikreuzer merged 1 commit into
openhab:mainfrom
Hilbrand:more_checks

Conversation

@Hilbrand

@Hilbrand Hilbrand commented Feb 1, 2021

Copy link
Copy Markdown
Member

Checkstyle:

  • Change NewlineAtEndOfFile (error): Changed no new line at end of file
    to error (we always keep commenting on it. So if it's an error people
    have to fix it right away).
  • EqualsAvoidNull (warning): Give warning when constant not at the left
    side of equals.

PMD:

  • Added CompareObjectsWithEquals (error): Use equals to compare objects.
  • UseCollectionIsEmpty (warning): Use isEmpty() to check if collection
    is empty.
  • SimplifyBooleanReturns (info)
  • UnusedLocalVariable (info)
  • UnusedPrivateField (info)
  • UnusedPrivateMethod (info)

Checkstyle:
- Change NewlineAtEndOfFile (error): Changed no new line at end of file
to error (we always keep commenting on it. So if it's an error people
have to fix it right away).
- EqualsAvoidNull (warning): Give warning when constant not at the left
side of equals.

PMD:
- Added CompareObjectsWithEquals (error): Use equals to compare objects.
- UseCollectionIsEmpty (warning): Use isEmpty() to check if collection
is empty.
- SimplifyBooleanReturns (info)
- UnusedLocalVariable (info)
- UnusedPrivateField (info)
- UnusedPrivateMethod (info)

Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
@Hilbrand
Hilbrand requested a review from wborn February 1, 2021 11:53
@Hilbrand
Hilbrand requested a review from a team as a code owner February 1, 2021 11:53

@wborn wborn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think these make sense too. What do the other @openhab/sat-maintainers think?

@kaikreuzer kaikreuzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm, thanks!

@kaikreuzer
kaikreuzer merged commit 73a92fe into openhab:main Apr 11, 2021
@kaikreuzer kaikreuzer added this to the 0.11.0 milestone Apr 11, 2021
@Hilbrand
Hilbrand deleted the more_checks branch April 11, 2021 14:43
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