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

Add checkstyle rules #241

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add checkstyle rules #241

wants to merge 1 commit into from

Conversation

jasta
Copy link
Contributor

@jasta jasta commented Aug 3, 2015

This is intended to run on Travis-CI to fail builds which don't adhere
to the style.

Closes #239

This is intended to run on Travis-CI to fail builds which don't adhere
to the style.
@jasta
Copy link
Contributor Author

jasta commented Aug 3, 2015

Oops, didn't work for some reason.


checkstyle {
configFile = new File("${project.projectDir}", "checkstyle.xml")
}
Copy link

Choose a reason for hiding this comment

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

  • the configFile should be configured using the rootDir project variable
  • you should explicitly set the checkstyle version used by gradle via toolVersion (note that some Gradle versions are incompatible with same checkstyle versions. e.g. Gradle v2.5 isn't playing nice with checkstyle v6.8)
checkstyle {
    configFile = new File(rootDir, 'checkstyle.xml')
    toolVersion = '6.7'
}

Copy link

Choose a reason for hiding this comment

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

also you should probably put this block into the allprojects block above to apply the plugin to all subprojects

@facebook-github-bot
Copy link

Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours has expired.

Before we can review or merge your code, we need you to email [email protected] with your details so we can update your status.

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants