Skip to content

Conversation

@eejbyfeldt
Copy link
Contributor

@eejbyfeldt eejbyfeldt commented Sep 3, 2024

Which issue does this PR close?

N/A

Rationale for this change

Many of the warnings produced by shellcheck are indications of bugs in the script that would break under certain circumstances.

What changes are included in this PR?

The following warnings was previously produced:
SC2006
SC2035
SC2045
SC2086
SC2140
SC2221 (SC2222)

Are these changes tested?

Manually running the script.

Are there any user-facing changes?

No.

@eejbyfeldt eejbyfeldt marked this pull request as ready for review September 3, 2024 12:51
Copy link
Contributor

@edmondop edmondop left a comment

Choose a reason for hiding this comment

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

I wonder if we want to add something here https://github.com/apache/datafusion/tree/main/dev (lint_scripts.sh) maybe? And maybe also a task in CI?

usage
;;
-*|--*)
-*)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The removed pattern is a subset of -* and will therefore never match. https://www.shellcheck.net/wiki/SC2221

@eejbyfeldt
Copy link
Contributor Author

I wonder if we want to add something here https://github.com/apache/datafusion/tree/main/dev (lint_scripts.sh) maybe? And maybe also a task in CI?

Agreed. If people agree that this is a change in the desired direction. Then it makes sense to address the same issues in other bash scripts in this repo and add a CI check as a follow up.

echo "RESULTS_DIR: ${RESULTS_DIR}"
echo "CARGO_COMMAND: ${CARGO_COMMAND}"
echo "PREFER_HASH_JOIN": ${PREFER_HASH_JOIN}
echo "PREFER_HASH_JOIN: ${PREFER_HASH_JOIN}"
Copy link
Contributor

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @eejbyfeldt I feel this PR is great.

@comphead
Copy link
Contributor

comphead commented Sep 3, 2024

I wonder if we want to add something here https://github.com/apache/datafusion/tree/main/dev (lint_scripts.sh) maybe? And maybe also a task in CI?

Agreed. If people agree that this is a change in the desired direction. Then it makes sense to address the same issues in other bash scripts in this repo and add a CI check as a follow up.

This is a nice idea. Not sure about having another CI task though.

@comphead comphead merged commit 169fc1e into apache:main Sep 3, 2024
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.

3 participants