This change allows us to skip javadoc checks for such test directories:
- cts/tests/tests/
- /test/src/
Test: none
Change-Id: I6a3bedaed816a3e764ca7e66ee364cd30e16c55b
It was originally added internally in ag/1085881, but then got
reverted via merge when android-styles.xml got split into multiple
files in r.android.com/305437
Bug: None
Test: None
Change-Id: I08bde16212c563a8d43995a97ffe47b2c43ed952
This will allow teams to reuse parts of checkstyle without having
to worry about missing any checks when they change in the main configs.
Bug: None
Test: Tested locally and checkstyle still verifies the same rules using android-style.xml
Change-Id: I91ca11d3d7089db656bc640549bd7012284a8859
Add [project/foo/bar] to the beginning of each Checkstyle error line
if the REPO_PROJECT environmental variable is set (set by repo hooks).
Test: manually attempted to run checkstyle.
Change-Id: I8ccf76d9ce9306668109029267081924300cb6ce
Certain projects might want to enable checkstyle gradually so
we need a way to whitelist which files should be checked.
Test: added test_FilterFiles
Change-Id: I501677ce824f882ccb5f2ad129af8f596d01c6e8
Add a check to ignore changes to automatically generated classes.
Bug: None
Test: Tried to run checkstyle locally on a file that containted the comment
and checkstyle script showed no warnings even though that file had issues.
Change-Id: If9085948f1c224dbb53255b2ba1601511ef769dd
Bug: None
Test: Existing test_ShouldSkip will test this as it is using
checkstyle.SKIPPED_RULES_FOR_TEST_FILES
Change-Id: I56c8c86a36f93b6b72a87fd97b75e5233fde9077
This also requires modifying the logic to create temporary files so that
the filename is the same as that in source tree.
Bug: 27109166
Change-Id: I73f2406d5c85d45b0b259f0fd7dd081e44df029c
Usage e.g.: ./checkstyle.py -s 3aca02ca91816a86febb5ed6e380ec2122adea47
Additionally this CL adds a pre-push script that can be used a git
hook to run Checkstyle on 'repo upload'
Bug: 25852971
Change-Id: Ia00d48df80b2b024de0899d9590868016c5b7bf0
It is valid to have empty modified_lines list for files
that only contain deletions. In such case we should skip
all the errors except for forced rules.
Updated the test to match the expectation.
Change-Id: I6993968b882fb6fbe2ba1f63f3b6879c3308ff34
Checkstyle.py was not handling additions of new files resulting in
a crash. For new files git.modified_lines() returns None. Added code
handles that case.
Bug: 25852971
Change-Id: I91e2b8c92581ec9e89bcbbcd2d274f56c791f3a9
(cherry picked from commit 5b87dbad0c)
Allow developers to run Java style check in two ways.
Specific file:
checkstyle.py -f path/to/file/View.java
Lines modified in the latest commit:
checkstyle.py
Review moved from https://googleplex-android-review.googlesource.com/#/c/818813/
due to move from packages/experimental to development/tools
Bug: 25852971
Change-Id: Ibcf9d80644f2938828b21e8f50ab0d6f39c286b0
(cherry picked from commit 96f27d0960)