tag | e99b1999032e9bd2ed1b11d1bf6cbadbb84f2030 | |
---|---|---|
tagger | The Android Open Source Project <initial-contribution@android.com> | Mon Sep 07 11:18:30 2020 -0700 |
object | 43f6c66939093b8f1b7d36b1279bd689810b7989 |
Android 11.0.0 mainline release 1
commit | 43f6c66939093b8f1b7d36b1279bd689810b7989 | [log] [tgz] |
---|---|---|
author | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Feb 10 17:10:34 2020 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Feb 10 17:10:34 2020 +0000 |
tree | 455115ac00025289ede11af524599603b94daa3a | |
parent | 1b95dd79828e47667dddc60190b209b3e521254d [diff] | |
parent | 9d4418611c1038a3eb2e6acb4fed08903c05b289 [diff] |
Add support for python3 am: 4ebbfecef0 am: 2e69c77cd6 am: 9d4418611c Change-Id: Ie788e5de968663a01084299e3269fe7c7c6c0fa9
Checkstyle is used by developers to validate Java code style and formatting, and can be run as part of the pre-upload hooks.
It can be invoked in two ways.
checkstyle.py -f FILE [FILE ...]
checkstyle.py
A development tool to help programmers write Java code that adheres to a coding standard.
Git-lint is a tool to run lint checks on only files changed in the latest commit.
To run checkstyle as part of the pre-upload hooks, add the following line to your PREUPLOAD.cfg
:
checkstyle_hook = ${REPO_ROOT}/prebuilts/checkstyle/checkstyle.py --sha ${PREUPLOAD_COMMIT}
Note that checkstyle does not always agree with clang-format, and so it's best to only have one enabled for Java.
In .clang-format
add the following to disable format checking and correcting for Java:
--- Language: Java DisableFormat: true SortIncludes: false ---
In some versions of clang-format, DisableFormat
doesn't stop the sorting of includes. So to fully disable clang-format from doing anything for Java files, both options are needed.