Page MenuHomePhabricator

Integrate the lint-tests.sh linter into arcanist
ClosedPublic

Authored by Fabien on Feb 9 2019, 08:51.

Details

Summary
  • Make the lint-tests.sh script take a single file at input for name mismatch checking
  • Add a new arcanist linter that runs lint-tests.sh and parse the output
  • Make the lint-tests.sh script return 0 to avoid arcanist dropping the linter due to failure

Depends on D2532

Test Plan

Run arc lint, check there is no error.

Modify src/wallet/wallet_crypto_tests.cpp:
On the line containing BOOST_FIXTURE_TEST_SUITE, replace the test name:
wallet_crypto_tests by crypto_test
Run arc lint
Check that 2 errors are reported, on for name mismatch and one for
duplicated name.

Modify any cpp file directly located under src/
Run arc lint --trace
Check in the output that the file is not passed to the test linter.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
arcanist_lint_tests
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 4949
Build 7961: Bitcoin ABC Buildbot (legacy)
Build 7960: arc lint + arc unit

Event Timeline

deadalnix requested changes to this revision.Feb 9 2019, 16:32
deadalnix added inline comments.
arcanist/linter/TestsLinter.php
109 ↗(On Diff #7274)

Indentation is wrong

118 ↗(On Diff #7274)

space after if

143 ↗(On Diff #7274)

Fix identation

This revision now requires changes to proceed.Feb 9 2019, 16:32

Fix indentation and add space after if

This revision is now accepted and ready to land.Feb 10 2019, 13:37
This revision was automatically updated to reflect the committed changes.