HomePhabricator

Run the linters as part of arc land

Description

Run the linters as part of arc land

Summary:
The default arc land workflow does not run the linters before landing.
This can cause issues when the user issues a rebase before landing, such
as D5192.

This diff runs arc lint --severity autofix --amend-autofix before
arc land to try to catch these issues.

A --bypass-linters options is added to arc land to avoid deadlocks.

Test Plan:
Add a trailing whitespace to an arcanist PHP file, then:

arc land --preview

Check the linter error is returned.

arc land --preview --bypass-linters

Check no linter error is returned. Arc land will fail due to dirty tree.

Create a local commit with a clang-format violation (such as bad header
ordering).

arc land --preview

See the auto amend message. arc land should succeed.

arc help land

Check the --bypass-linters is added to the list.

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Subscribers: deadalnix, markblundeberg

Differential Revision: https://reviews.bitcoinabc.org/D5196

Details

Provenance
FabienAuthored on Feb 7 2020, 11:52
FabienPushed on Feb 7 2020, 18:14
Reviewer
Restricted Project
Differential Revision
D5196: Run the linters as part of arc land
Parents
rABCdb11d6bfc86a: qa: Prevent concurrency issues reading .cookie file
Branches
Unknown
Tags
Unknown