Age | Commit message (Collapse) | Author |
|
Change-Id: I40a0053d0e8aef27e8ef066e320a3256f38e6009
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1553823
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: Ieb6bbd35340e91586d64ff522174c53a27016085
|
|
aidl-format formats AIDL files.
Bug: 144540481
Test: Add `aidl_format = true` to /system/tools/aidl/REUPLOAD.cfg,
make a poorly formatted change in one of the AIDL file in the repo.
Creating a commit and executing `repo upload` caught it and did an
automatic fixup.
[FAILED] aidl_format
FILES: ('tests/android/aidl/tests/ITestService.aidl',) 17,18d16
...
[RUNNING 5/5] aidl_format
An automatic fix can be attempted for the "aidl_format" hook. Do you
want to run it? (Yes/no)? yes
Fix successfully applied. Amend the current commit before attempting to
upload again.
[FAILED] repohooks for platform/system/tools/aidl failed in 10.274s
FATAL: Preupload failed due to above error(s).
Change-Id: I3081360840dfbe989908cdffe189573799fc29ab
|
|
Change-Id: I0c8239db9b851ba4b08b4e04f3d6cfa6c3723f4a
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1373920
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I8be1bd9e133bad65c2cf6a55ae3b60ef141d3200
|
|
We've been emitting warnings about this for almost a year.
Bug: None
Test: `repo upload` still works w/Python 3.6
Change-Id: Iaead2a48ac125749176925302bf32e655384c965
|
|
Change-Id: I3b55743ca59e0bb8a3d78558ab79146697e6a243
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1515460
Change-Id: I7e38ffca92d04ddcce84ef12471dbbdb84ab4855
|
|
Change-Id: I64b6b049c23b0414595ec3bbb7e9541e44abf651
|
|
Bug: None
Test: added some slow hooks and reviewed the logged output
Change-Id: I19b024e995b564a12d929db2c5cf15a3e5a4a2b6
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1515081
Change-Id: Icb2d75c6ba4a2337f857540f83f94e8772821cd8
|
|
These are only used by Python 2 which we don't support.
Bug: None
Test: unittests pass
Change-Id: If5f26ca655ce58a9968eaa624424cf5186cf9625
|
|
Change-Id: I3e1e41bf4c3d680dc8125f5a69dbd1f95c072324
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1504936
Change-Id: I7e8c7b223cd20bf54fbfc17ef6dc9f66cb3a3031
|
|
This accounts for the case where we use triple quotes, but check
for singular quotes. Triple quotes are supported, so we need
to make sure we account for them when checking correctness.
This also fixes a triple quote use case that is technically
correct, but not supported.
Bug: 173702182
Test: ./hooks_unittest.py
Change-Id: I0b6e6deeac0addc3939b27db36a6ba47ff4bd2da
|
|
Change-Id: I174fc7f40d1fe674f79e8529695cc7d5c6530b6d
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1490697
Change-Id: I7734954e62f9a8b5ee53a064f341238b0af490e0
|
|
Because we need the quotes to check for starting and ending
Relnote tags, having unescaped quotes in the release note causes
the parsing to truncate at that unescaped release note.
So the following scenarios will now be disallowed:
Relnote: There are "quotes" in this relnote.
Relnote: "There are "quotes" in this relnote."
Relnote: "There are unescaped quotes in the second half of
this "sentence"."
Bug: 172663867
Test: ./pre-upload.py
Change-Id: Idc3769eab64aff7455453b9d50317e0d0cad2a44
|
|
Change-Id: I2e932f47cb1541e2a338b24d1f98301a740241d1
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1486482
Change-Id: I959401c88303f39673eb837873a9f2581a600c0c
|
|
We require Python 3 everywhere, so no point in this.
Bug: None
Test: unittests pass
Change-Id: If47bc351829610f7d7677f5255dc433ca1294079
|
|
Change-Id: I7b26cb2dc11ee19641428bf06c2d99463d844889
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1408931
Change-Id: Ieb4c41d997b5ddd49d9f58a1f257e56e53456dd0
|
|
gofmt -w writes the gofmt result to the source file for the files that
gofmt reports issues.
Bug: 116112526
Test: ran hook for gofmt can now auto-fix formatting
Change-Id: Ic676a588a567fbe5cf3f7a1411ac8048bde2af06
|
|
Change-Id: I8b68ac1121c2571f3f6f843c0fa3ebad89b98488
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1428528
Change-Id: Ie5f6a45ff10bffed2d6e1a2da1115cb2a8202c3a
|
|
re.Pattern was only introduced in Python 3.7.
Test: ./pre-upload
Bug: 168593718
Change-Id: I9dc685a8d1863808d9c475539a8f1fdbd96474d0
|
|
Change-Id: I3bb44596f9f8bcad7bf3e7e52995fdcf74e62456
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1422908
Change-Id: I92a7234bfbfd5076856a51ccca953aa6889c4611
|
|
We did this for pylint already, so switch the rest too.
Bug: None
Test: running each tool with --help works
Change-Id: I0c6156cbcfabf2ebb7874cbb8a52059b1a88dfcc
|
|
Change-Id: Id0c0092442d10282e2aef4140d51a5b367934c69
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1395027
Change-Id: Ia33c2a2caf6d02259fb3b393157a08d7e5e64a3f
|
|
Change-Id: I35431ec9ac6a5c004b9ec4a31fffed818c5f8f22
|
|
There is currently no convenient option to enable a hook globally if
some projects will fail the processing. The recommended setup is to
enable the hook within each project's repository (using PREUPLOAD.cfg).
This creates inconsistencies for large codebase. Adds a new
configuration section to explicitly exclude some projects during the
processing of a hook.
The intent of this change is to enable rustfmt globally in AOSP,
except for some paths (e.g. external/, vendor/).
Test: Modified GLOBAL-PREUPLOAD.cfg to enable the new option,
manually creates changes and review output of pre-upload.py
Bug: 160223496
Change-Id: I94dbbf0ce2e6b58c4d4b4fc89c56a2a87543d878
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1417624
Change-Id: I80c4a873c4e87b9936104d94e6723a72b3649341
|
|
No point in linting or testing when the code forces Python 3.6+.
Bug: None
Test: `repo upload` still works
Change-Id: I5af19b5dc70be3f5be99157d1fc4287e4437c553
|
|
Change-Id: I7221bb9ee372c8203f65d09a7fc42aca31fbf471
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1413981
Change-Id: I929668c32fb13fa260cd12562f00b026fdff3d52
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1413980
Change-Id: Ie264829e1cbf047d0bc6af3cc021d42f4a304dc4
|
|
PreUploadFileTests and PreUploadSettingsTests share the same setup and
teardown for writing configuration files. Extract that behaviour into a
new class (FileTestsBase).
Test: pre-upload.py
Bug: 160223496
Change-Id: I8b572cdb0f43ae4557323a43a69e66ead67d87fe
|
|
Creates 2 new classes to differentiate local (PREUPLOAD.cfg) and global
(GLOBAL-PREUPLOAD.cfg) files. While not useful yet, this allows to
implement validation that is specific to local files.
Ideally, PreUploadFile would be declared as @abstractclass but the
support for py2/py3 makes this constraint tedious to implement.
Test: pre-upload.py
Bug: 160223496
Change-Id: I75e0e644f713002f1ba50a405965362c1c5a7589
|
|
Change-Id: Ibbb1b25116bbd29eac688754e0d4d685729c9d63
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1373921
Change-Id: I2f0e1d3939e10be0763b24ecc0b14118c1be048e
|
|
Repo itself has been warning about Python 2 support for over a year,
while pre-uplooad has been warning for about a month.
We don't actually rip out any code (yet) to make sure this sticks in
case we have to revert things temporarily.
Bug: None
Test: `repo upload` still works w/Python 3.6
Change-Id: Ia00bc3c9a59b0e6828df2691f47c6da94adb8038
|
|
Change-Id: If6d5ce038b557a6ce486ac35f274f08e8846d7f8
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1409412
Change-Id: Id7ed769c4436ae3d316ad046d1c181fd316f60b3
|
|
The existing config management started out with just one file, but
has grown to load & merge from multiple sources. Refactor classes
to better reflect this: one class to represent a single file, and
another to represent the union of them all.
By itself, this isn't interesting. But it lays the groundwork to
be able to load config files from subdirs instead of only one file
per project.
Bug: 160223496
Test: Unittests pass
Change-Id: I522b18fa8bc31f787c92cf95db7da4168007915e
|
|
Change-Id: I74b95a4dfe2f231fdaa508f1a8c64b0c9a6ca7a5
|
|
Original change: https://android-review.googlesource.com/c/platform/tools/repohooks/+/1409411
Change-Id: I20b225c3916994aabf677b5fdc86c5f5dbdae60f
|
|
Change-Id: I6f64fe07bc14d1ba55231d322bfbe807a520a028
|