qa: Pin shellcheck version #15166

pull practicalswift wants to merge 4 commits into bitcoin:master from practicalswift:opt-out-of-new-shellcheck-warnings changing 4 files +21 −20
  1. practicalswift commented at 4:08 PM on January 14, 2019: contributor

    Pin shellcheck version.

  2. promag commented at 4:15 PM on January 14, 2019: member

    Can't we lock the installed version instead?

  3. practicalswift force-pushed on Jan 14, 2019
  4. practicalswift commented at 4:38 PM on January 14, 2019: contributor

    @promag The shellcheck on Travis is pre-installed AFAIK - we don't install it explicitly in our Travis conf. Also since we don't control the version the user has installed pinning wouldn't have prevented the version problem described in https://github.com/bitcoin/bitcoin/pull/14115/commits/908a559f33cf9d774953ce46e159e66fc9bc758d.

  5. promag commented at 4:43 PM on January 14, 2019: member

    @practicalswift IMO what the user has it not a problem, instead it helps if the user has a newer version so he can update the travis one if necessary.

    We could run in a docker container?

  6. practicalswift commented at 4:54 PM on January 14, 2019: contributor

    @promag Yes, pinning the version by going the Docker route would be an alternative way to solve this. I'll let @laanwj chime in here.

  7. laanwj commented at 5:02 PM on January 14, 2019: member

    I think it makes sense to allow for some variability in shellcheck versions for people that want to run this locally. (this isn't an argument against pinning as well, though)

  8. promag commented at 10:15 PM on January 14, 2019: member

    Just to be clear, in travis run the linter in a container with a specific version of shellcheck, locally use the one available in the path?

  9. MarcoFalke commented at 10:27 PM on January 14, 2019: member

    So we'd still had to support multiple versions of shellcheck

  10. promag commented at 10:31 PM on January 14, 2019: member

    @MarcoFalke why? The official supported would be the travis IMO. If the linter fails for the user then he either upgrades/downgrades his version or submit a pull to fix the (most likely) new version.

  11. fanquake added the label Tests on Jan 14, 2019
  12. DrahtBot commented at 7:03 AM on January 15, 2019: member

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #13728 (WIP: Scripts and tools: Run the CI lint stage on mac by Empact)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  13. practicalswift force-pushed on Jan 15, 2019
  14. practicalswift commented at 8:35 AM on January 15, 2019: contributor

    @promag The proposed solution allows for some variability in shellcheck versions. Could you describe what problems foresee with allowing for such variability? If I know the problems I can perhaps help solve them :-)

  15. koalaman commented at 5:23 PM on January 15, 2019: contributor

    As the shellcheck author I would definitely recommend pinning versions rather than filtering suggestions. This is because the scope of existing suggestions often changes through improvements or bugfixes.

    For example, the SC2054 warning that commas won't work as an array separator recently had its detection criteria changed, so now shellcheck master (and therefore the next release) will start triggering on test/lint/lint-format-strings.sh due to its array containing unquoted FatalError,0 fprintf,1 ..

    By pinning, you can upgrade at your leisure without surprise build breaks.

  16. practicalswift commented at 7:24 PM on January 15, 2019: contributor

    @koalaman Thanks for the input! What is the best way to achieve version pinning of shellcheck in Travis? Travis pre-installs shellcheck.

  17. jvbo approved
  18. koalaman commented at 3:02 AM on January 16, 2019: contributor

    @practicalswift Unfortunately I'm not very familiar with Travis myself.

    Someone contributed a recipe which just downloads a specific release version (which could obviously be improved by verifying the checksum):

    export scversion="stable" # or "v0.4.7", or "latest"
    wget "https://storage.googleapis.com/shellcheck/shellcheck-${scversion}.linux.x86_64.tar.xz"
    tar --xz -xvf shellcheck-"${scversion}".linux.x86_64.tar.xz
    cp shellcheck-"${scversion}"/shellcheck /usr/bin/
    shellcheck --version
    

    Specific ShellCheck releases can also be run via Docker, if that helps.

  19. promag commented at 9:40 AM on January 16, 2019: member

    We already use docker so I guess we could use the one available in bionic?

  20. DrahtBot added the label Needs rebase on Jan 16, 2019
  21. practicalswift force-pushed on Jan 16, 2019
  22. practicalswift force-pushed on Jan 16, 2019
  23. practicalswift force-pushed on Jan 16, 2019
  24. Pin shellcheck version to v0.6.0 638e53b472
  25. Remove repeated suppression. Fix indentation. 07a53dce9f
  26. Fix warnings introduced in shellcheck v0.6.0 0b7196ecad
  27. Remove no longer needed shellcheck suppressions a517541794
  28. practicalswift force-pushed on Jan 16, 2019
  29. practicalswift force-pushed on Jan 16, 2019
  30. practicalswift renamed this:
    qa: Ignore shellcheck warnings introduced in new versions
    qa: Pin shellcheck version
    on Jan 16, 2019
  31. practicalswift commented at 2:57 PM on January 16, 2019: contributor

    Now pinning the shellcheck version instead. Please re-review :-)

  32. DrahtBot removed the label Needs rebase on Jan 16, 2019
  33. MarcoFalke commented at 3:40 PM on January 16, 2019: member

    ACK, we do the same for the pip packages

  34. promag commented at 4:01 PM on January 16, 2019: member

    I guess checksum verification is not necessary. Still curious why not docker. utACK a517541 though.

  35. practicalswift commented at 9:22 PM on January 16, 2019: contributor

    @promag We don't use Docker for any of the linters. The non-Docker setup is simpler.

  36. MarcoFalke merged this on Jan 17, 2019
  37. MarcoFalke closed this on Jan 17, 2019

  38. MarcoFalke referenced this in commit 12b30105fc on Jan 17, 2019
  39. fanquake referenced this in commit 1088b90cba on Jul 5, 2019
  40. PastaPastaPasta referenced this in commit 2e7f07ebeb on Jul 29, 2020
  41. zkbot referenced this in commit 43ac2062f9 on Oct 28, 2020
  42. zkbot referenced this in commit 84a5830aaa on Nov 9, 2020
  43. practicalswift deleted the branch on Apr 10, 2021
  44. UdjinM6 referenced this in commit a36416db73 on Sep 10, 2021
  45. UdjinM6 referenced this in commit 81e2cb45d9 on Sep 24, 2021
  46. UdjinM6 referenced this in commit d21832bdd8 on Oct 4, 2021
  47. UdjinM6 referenced this in commit 26449bcccf on Oct 5, 2021
  48. kittywhiskers referenced this in commit 37c3de414a on Oct 12, 2021
  49. UdjinM6 referenced this in commit 0f14a3b95c on Oct 23, 2021
  50. UdjinM6 referenced this in commit 895db4c752 on Oct 23, 2021
  51. pravblockc referenced this in commit 39d4ee6109 on Nov 18, 2021
  52. UdjinM6 referenced this in commit ffe950bbc7 on Dec 4, 2021
  53. gades referenced this in commit 5f61231ec2 on May 24, 2022
  54. DrahtBot locked this on Aug 18, 2022

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 15:15 UTC

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