Page MenuHomePhabricator

Add python3 script shebang lint
ClosedPublic

Authored by Fabien on Wed, Aug 21, 15:09.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC7d3bbc25a645: Add python3 script shebang lint
Summary

Backport of core PR12972
https://github.com/bitcoin/bitcoin/pull/12972/files

This converts the test-security.py script to python3 and add a linter
to enforce python3 shebang.

Core ignores python files with no shebang. I prefer to add them to the
files missing it (with the exception of the __init__.py files).

Depends on D3927.

Test Plan

Should return no error:

arc lint --everything

Edit contrib/devtools/test-security.py to remove the shebang.
Check the linter throw an error.

Add a shebang with /usr/bin/env python or /usr/bin/env python2.
Check the linter throw an error.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Wed, Aug 21, 15:09
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Aug 21, 15:09
deadalnix accepted this revision.Thu, Aug 22, 18:02
This revision is now accepted and ready to land.Thu, Aug 22, 18:02
This revision was automatically updated to reflect the committed changes.