Skip to content
This repository has been archived by the owner on May 1, 2023. It is now read-only.

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 cla@fb.com 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants