Clone this repository and follow instruction to set eveything up.
Run .installCodeStyle.sh on Mac or Linux. Windows is not supported yet.
Run
./installCheckstyle.sh <project_path>to install checkstyle rules to your project.
It will be copied to <project_path>/config/checkstyle/checkstyle.xml.
You can configure IDEA Checkstyle plugin to use a project file or a remote URL.
See also Gradle docs.