test: Move linters to test/lint, add readme #13281

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:Mf1805-qaLint changing 18 files +42 −28
  1. MarcoFalke commented at 2:49 PM on May 19, 2018: member

    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.)

  2. MarcoFalke force-pushed on May 19, 2018
  3. MarcoFalke force-pushed on May 19, 2018
  4. MarcoFalke force-pushed on May 19, 2018
  5. laanwj added the label Refactoring on May 19, 2018
  6. laanwj added the label Tests on May 19, 2018
  7. practicalswift commented at 8:00 AM on May 21, 2018: contributor

    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.
    
  8. MarcoFalke commented at 2:14 PM on May 21, 2018: member

    @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.

  9. MarcoFalke commented at 9:10 PM on May 23, 2018: member

    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.

  10. promag commented at 10:48 PM on May 23, 2018: member

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

  11. MarcoFalke commented at 2:27 PM on May 24, 2018: member

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

  12. jnewbery commented at 3:36 PM on May 24, 2018: member

    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.

  13. MarcoFalke force-pushed on May 24, 2018
  14. MarcoFalke force-pushed on May 24, 2018
  15. MarcoFalke commented at 3:59 PM on May 24, 2018: member
  16. test: Move linters to test/lint, add readme fa3c910bfe
  17. MarcoFalke force-pushed on May 24, 2018
  18. practicalswift commented at 4:24 PM on May 24, 2018: contributor

    @MarcoFalke Looks good! :-)

    utACK fa3c910bfeab00703c947c5200a64c21225b50ef

  19. sipa commented at 6:31 PM on May 24, 2018: member

    utACK fa3c910bfeab00703c947c5200a64c21225b50ef

  20. kallewoof commented at 4:16 AM on May 25, 2018: member

    utACK fa3c910

  21. Empact commented at 10:22 AM on May 25, 2018: member

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

  22. jnewbery commented at 1:51 PM on May 25, 2018: member

    utACK https://github.com/bitcoin/bitcoin/commit/fa3c910bfeab00703c947c5200a64c21225b50ef , modulo Empact's comment about the check-doc documentation.

  23. laanwj assigned laanwj on May 28, 2018
  24. ken2812221 commented at 7:07 PM on May 28, 2018: contributor

    utACK fa3c910

  25. laanwj commented at 1:45 PM on May 29, 2018: member

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

  26. laanwj merged this on May 29, 2018
  27. laanwj closed this on May 29, 2018

  28. laanwj referenced this in commit 2ac6315f44 on May 29, 2018
  29. laanwj referenced this in commit 3a8e3f4806 on May 29, 2018
  30. MarcoFalke deleted the branch on May 29, 2018
  31. MarcoFalke referenced this in commit f0a6a922fe on Sep 13, 2018
  32. PastaPastaPasta referenced this in commit d1ba38fe77 on Jul 17, 2020
  33. PastaPastaPasta referenced this in commit 53e7e69ebe on Jul 17, 2020
  34. PastaPastaPasta referenced this in commit 9ab7652a4d on Jul 19, 2020
  35. PastaPastaPasta referenced this in commit 6cd3050c7f on Jul 21, 2020
  36. UdjinM6 referenced this in commit 8422b1b6aa on Jul 29, 2020
  37. UdjinM6 referenced this in commit daaf05a13d on Jul 29, 2020
  38. PastaPastaPasta referenced this in commit 7be2b2456a on Jul 29, 2020
  39. zkbot referenced this in commit 311a079dd5 on Oct 27, 2020
  40. zkbot referenced this in commit 43ac2062f9 on Oct 28, 2020
  41. zkbot referenced this in commit 84a5830aaa on Nov 9, 2020
  42. PastaPastaPasta referenced this in commit 0c1f5b5934 on Jun 27, 2021
  43. PastaPastaPasta referenced this in commit 59d65a9da9 on Jun 28, 2021
  44. PastaPastaPasta referenced this in commit 746ae504ca on Jun 29, 2021
  45. PastaPastaPasta referenced this in commit f4956266df on Jul 1, 2021
  46. MarcoFalke locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 21:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me