Pin shellcheck version.
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-
practicalswift commented at 4:08 PM on January 14, 2019: contributor
-
promag commented at 4:15 PM on January 14, 2019: member
Can't we lock the installed version instead?
- practicalswift force-pushed on Jan 14, 2019
-
practicalswift commented at 4:38 PM on January 14, 2019: contributor
@promag The
shellcheckon 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. -
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?
-
practicalswift commented at 4:54 PM on January 14, 2019: contributor
-
laanwj commented at 5:02 PM on January 14, 2019: member
I think it makes sense to allow for some variability in
shellcheckversions for people that want to run this locally. (this isn't an argument against pinning as well, though) -
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?
-
MarcoFalke commented at 10:27 PM on January 14, 2019: member
So we'd still had to support multiple versions of shellcheck
-
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.
- fanquake added the label Tests on Jan 14, 2019
-
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.
- practicalswift force-pushed on Jan 15, 2019
-
practicalswift commented at 8:35 AM on January 15, 2019: contributor
@promag The proposed solution allows for some variability in
shellcheckversions. Could you describe what problems foresee with allowing for such variability? If I know the problems I can perhaps help solve them :-) -
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.shdue to its array containing unquotedFatalError,0 fprintf,1 ..By pinning, you can upgrade at your leisure without surprise build breaks.
-
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
shellcheckin Travis? Travis pre-installsshellcheck. - jvbo approved
-
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 --versionSpecific ShellCheck releases can also be run via Docker, if that helps.
-
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?
- DrahtBot added the label Needs rebase on Jan 16, 2019
- practicalswift force-pushed on Jan 16, 2019
- practicalswift force-pushed on Jan 16, 2019
- practicalswift force-pushed on Jan 16, 2019
-
Pin shellcheck version to v0.6.0 638e53b472
-
Remove repeated suppression. Fix indentation. 07a53dce9f
-
Fix warnings introduced in shellcheck v0.6.0 0b7196ecad
-
Remove no longer needed shellcheck suppressions a517541794
- practicalswift force-pushed on Jan 16, 2019
- practicalswift force-pushed on Jan 16, 2019
- practicalswift renamed this:
qa: Ignore shellcheck warnings introduced in new versions
qa: Pin shellcheck version
on Jan 16, 2019 -
practicalswift commented at 2:57 PM on January 16, 2019: contributor
Now pinning the
shellcheckversion instead. Please re-review :-) - DrahtBot removed the label Needs rebase on Jan 16, 2019
-
MarcoFalke commented at 3:40 PM on January 16, 2019: member
ACK, we do the same for the pip packages
-
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.
-
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.
- MarcoFalke merged this on Jan 17, 2019
- MarcoFalke closed this on Jan 17, 2019
- MarcoFalke referenced this in commit 12b30105fc on Jan 17, 2019
- fanquake referenced this in commit 1088b90cba on Jul 5, 2019
- PastaPastaPasta referenced this in commit 2e7f07ebeb on Jul 29, 2020
- zkbot referenced this in commit 43ac2062f9 on Oct 28, 2020
- zkbot referenced this in commit 84a5830aaa on Nov 9, 2020
- practicalswift deleted the branch on Apr 10, 2021
- UdjinM6 referenced this in commit a36416db73 on Sep 10, 2021
- UdjinM6 referenced this in commit 81e2cb45d9 on Sep 24, 2021
- UdjinM6 referenced this in commit d21832bdd8 on Oct 4, 2021
- UdjinM6 referenced this in commit 26449bcccf on Oct 5, 2021
- kittywhiskers referenced this in commit 37c3de414a on Oct 12, 2021
- UdjinM6 referenced this in commit 0f14a3b95c on Oct 23, 2021
- UdjinM6 referenced this in commit 895db4c752 on Oct 23, 2021
- pravblockc referenced this in commit 39d4ee6109 on Nov 18, 2021
- UdjinM6 referenced this in commit ffe950bbc7 on Dec 4, 2021
- gades referenced this in commit 5f61231ec2 on May 24, 2022
- DrahtBot locked this on Aug 18, 2022