Skip to content

Add and enforce checkstyle, lint, findbugs, and pmd #420

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

Merged
merged 50 commits into from
Dec 6, 2016
Merged

Add and enforce checkstyle, lint, findbugs, and pmd #420

merged 50 commits into from
Dec 6, 2016

Conversation

SUPERCILEX
Copy link
Collaborator

I noticed two things that lead to this PR:

  1. We never did a full gradle check
  2. We had a checkstyle, but it was never enforced

I started trying to get checkstyle to work and ended up adding all the common CI analysis tools/checks.

I went through and added checkstyle, lint, findbugs, and pmd. PMD is the only check that isn't enforced because it still needs to be configured to ignore tests. (It doesn't like the underscores in the test method names)

In the process, I fixed a ton of style and code issues.

SUPERCILEX and others added 7 commits December 1, 2016 18:08
…ndbugs

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/util/signincontainer/IdpSignInContainer.java
Apparently, the "message" in lint-baseline.xml has to match with the actual error which is a problem since version updates change the message each time.
@samtstern
Copy link
Contributor

See: #418 (comment)

@SUPERCILEX SUPERCILEX changed the base branch from master to version-1.1.0-dev December 6, 2016 17:22
@samtstern
Copy link
Contributor

samtstern commented Dec 6, 2016

@SUPERCILEX merged #418 first, which introduced a conflict here.

I'll merge this next, and then #426.

…tyle_pmd_findbugs

# Conflicts:
#	auth/src/main/java/com/firebase/ui/auth/ui/email/AcquireEmailHelper.java
#	auth/src/main/java/com/firebase/ui/auth/ui/email/RegisterEmailActivity.java
#	auth/src/main/java/com/firebase/ui/auth/ui/email/SignInNoPasswordActivity.java
#	auth/src/main/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivity.java
#	auth/src/test/java/com/firebase/ui/auth/ui/email/SignInNoPasswordActivityTest.java
#	auth/src/test/java/com/firebase/ui/auth/ui/idp/AuthMethodPickerActivityTest.java
Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX
Copy link
Collaborator Author

@samtstern merged.

@SUPERCILEX
Copy link
Collaborator Author

This is awesome! The build failed because I forgot to delete an unused string resource.

@samtstern
Copy link
Contributor

That is cool, also I love describing a build failure as "awesome" 👍

@SUPERCILEX
Copy link
Collaborator Author

Yeah, "useful" would probably be a better word 😄

Signed-off-by: Alex Saveau <[email protected]>
@SUPERCILEX
Copy link
Collaborator Author

That's one thing I wasn't sure about, do we want to enforce a max line length?

@SUPERCILEX
Copy link
Collaborator Author

@samstern, good to go! See my comment above though.

@samtstern samtstern merged commit ac1fb39 into firebase:version-1.1.0-dev Dec 6, 2016
@samtstern
Copy link
Contributor

@SUPERCILEX regarding max line length I don't think we need to enforce that, I generally try to keep my lines under 100 chars but I subscribe to the golang philosophy:

'Go has no line length limit. Don't worry about overflowing a punched card. If a line feels too long, wrap it and indent with an extra tab.'

@samstern
Copy link

samstern commented Dec 6, 2016

Hey, I think you have the wrong guy. Are you confusing me with @samtstern?

@samtstern
Copy link
Contributor

@samstern yes I think he was, cool name though 😄

@samstern
Copy link

samstern commented Dec 6, 2016

It's the BEST name!!

@SUPERCILEX SUPERCILEX deleted the checkstyle_pmd_findbugs branch December 6, 2016 18:07
@SUPERCILEX
Copy link
Collaborator Author

Oops, sorry @samstern that was a typo 😄

@SUPERCILEX SUPERCILEX mentioned this pull request Dec 7, 2016
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