Skip to content

Conversation

maflcko
Copy link
Member

@maflcko maflcko commented May 19, 2018

This moves the checks and linters from devtools to a subfolder in test. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

@maflcko maflcko force-pushed the Mf1805-qaLint branch 3 times, most recently from 8f00208 to 920b523 Compare May 19, 2018 14:54
@practicalswift
Copy link
Contributor

practicalswift commented May 21, 2018

The test/lint/ move is an obvious utACK, but the "add readme" part is troublesome:

The following addition …

This folder contains lint scripts that aim to prevent direct or indirect user facing bugs.
Patches that do not pass the linter checks are usually not accepted.

Note that the [recommended style](/doc/developer-notes.md) and other stylistic
inconsistencies should not be enforced unless they could result in user facing bugs.

… formalizes a new "automation skeptical" (for lack of a better word!) policy which in the light of recent discussions on linting (see for example the discussion in @kallewoof's PR #12879) does not seem to be backed by consensus.

Personally I subscribe to the automation/linting philosophy outlined by @sipa in #12879:

If there is a widespread opinion among contributors and maintainers that a particul guideline is worth the burden, then I think it should be put in the style guide - and if it is, it sounds great to enforce it.

I suggest the following text instead:

This folder contains lint scripts that automate the review process in some form.

If there is a widespread opinion among contributors and maintainers that a particular
guideline is worth the burden, then it should be put in the style guide - and if it is,
it is probably a good candidate for linting. However, the enforcement via linting should
be limited to issues that can reliably identified without false positives or false
negatives.

Patches that do not pass the linter checks are usually not accepted.

@maflcko
Copy link
Member Author

maflcko commented May 21, 2018

@practicalswift That was my first draft, but I realized that the style guide includes not only enforceable guidelines, but also a bunch of recommendations, that are fine to violate. For example the "Miscellaneous" coding style or the reference to the clang-format rules. While most of them can be reliably identified without false positives or false negatives, I think we should avoid enforcing them.

@maflcko
Copy link
Member Author

maflcko commented May 23, 2018

Also note that the wording is not strict "[...] other stylistic inconsistencies should not be enforced [...]"

We can always add a linter for stuff that is uncontroversial but not preventing any user facing bugs. See for example the linter that checks for trailing white space.

@promag
Copy link
Contributor

promag commented May 23, 2018

test/liny/lint-python.sh also catches python scripts in contrib/ and share/ - fine I guess?

@maflcko
Copy link
Member Author

maflcko commented May 24, 2018

@promag I guess that is fine or maybe even desired.

@jnewbery
Copy link
Contributor

Conecpt ACK moving the linters to test/lint. No need IMO to bundle that change with a new readme setting a policy about what should be linted.

If you want to change the linter policy, then it seems appropriate to raise it in a meeting. For this PR, I recommend you limit it to just moving the files.

@maflcko maflcko force-pushed the Mf1805-qaLint branch 2 times, most recently from 535e512 to 288434d Compare May 24, 2018 15:58
@maflcko
Copy link
Member Author

maflcko commented May 24, 2018

@practicalswift @jnewbery Done

@practicalswift
Copy link
Contributor

@MarcoFalke Looks good! :-)

utACK fa3c910

@sipa
Copy link
Member

sipa commented May 24, 2018

utACK fa3c910

@kallewoof
Copy link
Contributor

utACK fa3c910

@Empact
Copy link
Contributor

Empact commented May 25, 2018

contrib/devtools/README.md still documents check-doc, which has moved.

@jnewbery
Copy link
Contributor

jnewbery commented May 25, 2018

utACK fa3c910 , modulo Empact's comment about the check-doc documentation.

@laanwj laanwj self-assigned this May 28, 2018
@ken2812221
Copy link
Contributor

utACK fa3c910

@laanwj
Copy link
Member

laanwj commented May 29, 2018

I'm just going to merge this, so many utACKs for the current state.

@laanwj laanwj merged commit fa3c910 into bitcoin:master May 29, 2018
laanwj added a commit that referenced this pull request May 29, 2018
fa3c910 test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
laanwj added a commit that referenced this pull request May 29, 2018
93843f6 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](#13281 (comment)), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
@maflcko maflcko deleted the Mf1805-qaLint branch May 29, 2018 14:11
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Sep 13, 2018
14b29a7 Fix reference to lint-locale-dependence.sh (Hennadii Stepanov)

Pull request description:

  The wrong reference sneaked through bitcoin#13041 and bitcoin#13281.

Tree-SHA512: 39cc74297d00141206ce68b84575288a20e39e20ef717fa8b8c09076b5fb46d8281320b144a596094365f2a0704e5dd6bf960e35980ae4730546a72957403d69
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
93843f6 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](bitcoin#13281 (comment)), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 17, 2020
93843f6 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](bitcoin#13281 (comment)), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 19, 2020
93843f6 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](bitcoin#13281 (comment)), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 21, 2020
93843f6 doc: remove leftover check-doc documentation (fanquake)

Pull request description:

  Remove leftover check-doc.py documentation. Mentioned [here](bitcoin#13281 (comment)), it's now [here](https://github.com/bitcoin/bitcoin/tree/master/test/lint#check-docpy).

Tree-SHA512: 95a0ac221ffae109c1d4baf18a9220cf993fc07c005920a0bd09abdf52e8fb298e3b5df31fa18887719c5080d8531d18b84b7bd9c7c664ee2501ccd9e0975eb6
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 29, 2020
fa3c910 test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
UdjinM6 pushed a commit to UdjinM6/dash that referenced this pull request Jul 29, 2020
fa3c910 test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 29, 2020
fa3c910 test: Move linters to test/lint, add readme (MarcoFalke)

Pull request description:

  This moves the checks and linters from `devtools` to a subfolder in `test`. (Motivated by my opinion that the dev tools are mostly for generating code and updating the repo whereas the linters are read-only checks.)

  Also, adds a readme to clarify that checks and linters are only meant to prevent bugs and user facing issues, not merely stylistic preference or inconsistencies. (This is motivated by the diversity in developers and work flows as well as existing code styles. It would be too disruptive to change all existing code to a single style or too burdensome to force all developers to adhere to a single style. Also note that our style guide is changing, so locking in at the wrong style "too early" would only waste resources.)

Tree-SHA512: 9b10e89f2aeaf0c8a9ae248aa891d74e0abf0569f8e5dfd266446efa8bfaf19f0ea0980abf0b0b22f0d8416ee90d7435d21a9f9285b66df43f370b7979173406
zkbot added a commit to zcash/zcash that referenced this pull request Oct 27, 2020
Verifier for scriptable changes

Includes changes from the following upstream PRs:
- bitcoin/bitcoin#10189
  - Excluding the `CNode` scripted changes.
- bitcoin/bitcoin#10480
- bitcoin/bitcoin#11390
- bitcoin/bitcoin#13281
  - Only the lint scripts we already have.
- bitcoin/bitcoin#13454
  - Only changes to scripts we already have.
- bitcoin/bitcoin#14864
- bitcoin/bitcoin#16327
  - Includes some portability fixes to other shell scripts.
- bitcoin/bitcoin#20069
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
14b29a7 Fix reference to lint-locale-dependence.sh (Hennadii Stepanov)

Pull request description:

  The wrong reference sneaked through bitcoin#13041 and bitcoin#13281.

Tree-SHA512: 39cc74297d00141206ce68b84575288a20e39e20ef717fa8b8c09076b5fb46d8281320b144a596094365f2a0704e5dd6bf960e35980ae4730546a72957403d69
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
14b29a7 Fix reference to lint-locale-dependence.sh (Hennadii Stepanov)

Pull request description:

  The wrong reference sneaked through bitcoin#13041 and bitcoin#13281.

Tree-SHA512: 39cc74297d00141206ce68b84575288a20e39e20ef717fa8b8c09076b5fb46d8281320b144a596094365f2a0704e5dd6bf960e35980ae4730546a72957403d69
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
14b29a7 Fix reference to lint-locale-dependence.sh (Hennadii Stepanov)

Pull request description:

  The wrong reference sneaked through bitcoin#13041 and bitcoin#13281.

Tree-SHA512: 39cc74297d00141206ce68b84575288a20e39e20ef717fa8b8c09076b5fb46d8281320b144a596094365f2a0704e5dd6bf960e35980ae4730546a72957403d69
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
14b29a7 Fix reference to lint-locale-dependence.sh (Hennadii Stepanov)

Pull request description:

  The wrong reference sneaked through bitcoin#13041 and bitcoin#13281.

Tree-SHA512: 39cc74297d00141206ce68b84575288a20e39e20ef717fa8b8c09076b5fb46d8281320b144a596094365f2a0704e5dd6bf960e35980ae4730546a72957403d69
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants