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

ci: shellcheck checks #697

Merged
merged 2 commits into from
Sep 2, 2024
Merged

Conversation

storopoli
Copy link
Contributor

Following rust-bitcoin/rust-bitcoin#2762,
adding CI shellcheck cheks here as well.

I also did all fixes that I could find with

shellcheck **/*.sh

If I've missed any please let me know.

contrib/_test.sh Outdated Show resolved Hide resolved
@tcharding
Copy link
Member

CI needs re-writing here to use the new run_task script.

@storopoli
Copy link
Contributor Author

CI needs re-writing here to use the new run_task script.

This is not related to the PR right? Should this be followed in a new issue?

@apoelstra
Copy link
Member

This is not related to the PR right? Should this be followed in a new issue?

Yes, but if we're tweaking shellscripts here, and we are planning to replace the scripts, it will cause us rebasing trouble later and the benefit is much less.

@tcharding
Copy link
Member

Sorry I was not very clear. Mine was just a flippant comment and meant to imply "not worth putting too much effort in here since we need to re-write to use the new scripts".

@storopoli
Copy link
Contributor Author

Oh ok so should I move this to a draft and then rebase later?

@tcharding
Copy link
Member

You can do that, or if CI is all green I'll just ack it and re-base #699 on top (once I have that one working).

@storopoli
Copy link
Contributor Author

Yeah sorry there's a little delay in shellcheck CI notifications since I don't get them because I've never contributed to this repo.
I'll fix'em.

@tcharding
Copy link
Member

CI fails are unrelated to this PR. One is the cfg thing same as in rust-bitcoin and one is a windows thing that I've hit elsewhere and have not debugged.

@storopoli
Copy link
Contributor Author

@tcharding let me know when I should rebase this?

@tcharding
Copy link
Member

You can rebase and force push mate. FTR you can always push changes in front of me, I don't mind rebasing. If something is particularly bothering me I'll explicitly ask it not to merge. Thanks for checking!

@storopoli
Copy link
Contributor Author

rebased, I have not yet made a contribution here, hence I need approval to run CI 😞

@storopoli
Copy link
Contributor Author

Ok CI is still broken unrelated to this PR. I'll rebase sometime in the future when we fix that.

@apoelstra
Copy link
Member

Weird. CI seems to be failing because of a bug in #709 where we updated the MSRV but didn't update some tests .... but CI passed on #709 itself.

@apoelstra
Copy link
Member

Oh, no, the failure is the fault of this PR. The rand-std and hashes-std features do not exist anymore.

@storopoli
Copy link
Contributor Author

Oh, no, the failure is the fault of this PR. The rand-std and hashes-std features do not exist anymore.

Good catch! Removed. I need new CI authorization...

tcharding
tcharding previously approved these changes Aug 6, 2024
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bb3f500

@@ -80,7 +80,7 @@ esac
--enable-examples="$EXAMPLES" \
--enable-ctime-tests="$CTIMETESTS" \
--with-valgrind="$WITH_VALGRIND" \
--host="$HOST" $EXTRAFLAGS
--host="$HOST" "$EXTRAFLAGS"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In bb3f500:

If you want to change this file you'll need to PR upstream, or change the vendoring script here to modify it using sed. But you can't edit vendored code inline like this.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FTR I believe $EXTRAFLAGS is unquoted on purpose.

@tcharding
Copy link
Member

oooo, bad review by me :)

@apoelstra
Copy link
Member

Heh, I didn't notice it either. But my local CI scripts did.

FWIW we could change our vendoring code to just delete this file. It's not like we use it.

@Kixunil
Copy link
Collaborator

Kixunil commented Aug 7, 2024

We should delete the whole ci directory I think.

@storopoli
Copy link
Contributor Author

Ok I removed all changes inside secp256k1-sys and added it to the ignore_paths according to the action-shellcheck README

tcharding
tcharding previously approved these changes Aug 7, 2024
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 52ff1c2

.github/workflows/shellcheck.yml Outdated Show resolved Hide resolved
apoelstra
apoelstra previously approved these changes Aug 7, 2024
Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 888c75d successfully ran local tests

@apoelstra
Copy link
Member

Will let @tcharding take one more look before merging.

@tcharding
Copy link
Member

ACK b3faab6

Not that I've caught any mistakes in this PR yet with my reviews :)

githooks/pre-commit Outdated Show resolved Hide resolved
Kixunil
Kixunil previously approved these changes Aug 8, 2024
Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 359a89b

@storopoli
Copy link
Contributor Author

I cannot decode the error...

Kixunil
Kixunil previously approved these changes Aug 8, 2024
Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK bfdf5dc

@Kixunil
Copy link
Collaborator

Kixunil commented Aug 8, 2024

The CI failure looks unrelated, IIRC we don't pin nightly here.

apoelstra added a commit to rust-bitcoin/rust-bitcoin that referenced this pull request Aug 8, 2024
a0febf7 githooks: remove unnecessary shellcheck disables (Jose Storopoli)

Pull request description:

  We don't need to worry about nested quoting in SC2046.

  Thanks to Kixunil in rust-bitcoin/rust-secp256k1#697 for pointing that out.

ACKs for top commit:
  Kixunil:
    ACK a0febf7
  tcharding:
    ACK a0febf7
  apoelstra:
    ACK a0febf7 successfully ran local tests

Tree-SHA512: 83cdcc55c7e7922c05f5e78305086595a96745f34ea68ee99ed1c08c97683bd45d3c62e8d8b4bcba6b0572c9c65178ff4e21abd7178e2e8b0c9e42f4b25508fb
@tcharding
Copy link
Member

Maybe just wait for #699 to go in and see if that fixes the CI failure.

Comment on lines -45 to -48
say_err() {
say "$1" >&2
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not being used

Comment on lines -51 to -54
say_err() {
say "$1" >&2
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not being used

@storopoli
Copy link
Contributor Author

rebased after #699 was merged, cc @tcharding

Copy link
Collaborator

@Kixunil Kixunil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ae0a304

Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ae0a304

Copy link
Member

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK ae0a304 successfully ran local tests

@apoelstra apoelstra merged commit 59f122d into rust-bitcoin:master Sep 2, 2024
30 checks passed
@storopoli storopoli deleted the ci/shellcheck branch September 3, 2024 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants