[scripts] lint-whitespace: use perl instead of grep -P #12097

pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:lint-whitespace-no-grep-P changing 1 files +2 −2
  1. Sjors commented at 1:45 PM on January 5, 2018: member

    MacOS does not support grep -P out of the box. This change makes it easier for developers to check for whitespace problems locally.

    Based on this and this Stack Exchange answer.

    Tested with:

    export TRAVIS_COMMIT_RANGE='fe78c9a...62e0453'
    contrib/devtools/lint-whitespace.sh 
    This diff appears to have added new lines with tab characters instead of spaces.
    The following changes were suspected:
    
    diff --git a/src/test/bignum_tests.cpp b/src/test/bignum_tests.cpp
    @@ -0,0 +1,110 @@
    +	num.setint64(n);
    
  2. [scripts] lint-whitespace: use perl instead of grep -P
    MacOS does not support 'grep -P' out of the box. This change makes
    it easier for developers to check for whitespace problems locally.
    40b17f5f91
  3. jonasschnelli approved
  4. jonasschnelli commented at 7:31 PM on January 5, 2018: contributor

    Tested (macOS) ACK 40b17f5f9106e572420dada04c15ec452a8f4f41

  5. fanquake added the label Scripts and tools on Jan 5, 2018
  6. sipa commented at 10:31 AM on January 6, 2018: member

    Concept ACK

  7. randolf commented at 6:28 AM on January 9, 2018: contributor

    On NetBSD 7.0, "grep -P" is also not supported, so this change can be helpful there too (and maybe other platforms as well?).

  8. practicalswift commented at 4:30 PM on February 8, 2018: contributor

    Concept ACK

  9. laanwj commented at 10:21 AM on February 17, 2018: member

    Please, next time someone writes a script like this, use Python. Shell script is terrible for making portable tools. Every time someone introduces a shell script we go through countless iterations to make it compatible with every shell and OS tool environment since the 80's.

    (nevertheless, concept ACK)

  10. laanwj merged this on Mar 6, 2018
  11. laanwj closed this on Mar 6, 2018

  12. laanwj referenced this in commit 14475e2dcd on Mar 6, 2018
  13. Sjors deleted the branch on Mar 6, 2018
  14. PastaPastaPasta referenced this in commit 6f3f0af849 on Jun 13, 2020
  15. PastaPastaPasta referenced this in commit e1a9bceb07 on Jun 13, 2020
  16. PastaPastaPasta referenced this in commit aa70077cd9 on Jun 17, 2020
  17. PastaPastaPasta referenced this in commit a88ad9384f on Jun 18, 2020
  18. zkbot referenced this in commit 43ac2062f9 on Oct 28, 2020
  19. zkbot referenced this in commit 84a5830aaa on Nov 9, 2020
  20. 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-14 09:15 UTC

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