Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build, lint: Remove x-prefix's from comparisons, Fix some shell script issues the linter complains about, Re-enable boost include checks #2474

Closed
wants to merge 46 commits into from

Conversation

barton2526
Copy link
Member

@barton2526 barton2526 commented Mar 23, 2022

Addresses:

  • build: remove x-prefix's from comparisons

Very old shells suffered from bugs which meant that prefixing variables with an "x" to ensure that the lefthand side of a comparison always started with an alphanumeric character was needed. Modern shells don't suffer from this issue (i.e Bash was fixed in 1996).

In any case, we've already got unprefixed checks used in our codebase, i.e

https://github.com/bitcoin/bitcoin/blob/681b25e3cd7d084f642693152322ed9a40f33ba0/configure.ac#L292

and have libs (in depends) that also use unprefixed comparisons in their
configure scripts.

I think it's time that we consolidate on not using the x-prefix workaround. At best it's mostly just confusing. Could simplify some of these checks further in future.

More info: https://github.com/koalaman/shellcheck/wiki/SC2268 https://www.vidarholen.net/contents/blog/?p=1035

@barton2526 barton2526 marked this pull request as ready for review March 23, 2022 21:36
@barton2526 barton2526 changed the title lint: Fix some shell script issues the linter complains about lint: Fix some shell script issues the linter complains about, Re-enable boost include checks Mar 23, 2022
@jamescowens jamescowens requested a review from div72 March 24, 2022 15:24
@jamescowens jamescowens added this to the Kermit's Mom milestone Mar 24, 2022
@barton2526 barton2526 changed the title lint: Fix some shell script issues the linter complains about, Re-enable boost include checks build, lint: Remove x-prefix's from comparisons, Fix some shell script issues the linter complains about, Re-enable boost include checks Mar 25, 2022
barton2526 and others added 7 commits March 28, 2022 14:46
@barton2526
Copy link
Member Author

reopened as #2478

@barton2526 barton2526 deleted the lint2 branch April 5, 2022 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants