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

Script File Linting #1584

Merged
merged 1 commit into from
Jul 10, 2020
Merged

Script File Linting #1584

merged 1 commit into from
Jul 10, 2020

Conversation

kensipe
Copy link
Member

@kensipe kensipe commented Jul 9, 2020

From project root the following is clean now

for f in hack/*.sh; do shellcheck $f; done

Signed-off-by: Ken Sipe kensipe@gmail.com

Signed-off-by: Ken Sipe <kensipe@gmail.com>
Copy link
Member

@ANeumann82 ANeumann82 left a comment

Choose a reason for hiding this comment

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

lgtm, apart from the one change I mentioned

@@ -31,7 +31,7 @@ do

# Extract fields from header
KEP_NUMBER=$(echo "$KEP_HEADER" | sed -n -E 's/kep-number: ([0-9]+)/\1/p')
KEP_NUMBER=$(echo "$KEP_NUMBER" | sed 's/^0*//') # Strip leading zeros, or we interpret in octal
KEP_NUMBER="$((10#$KEP_NUMBER))" # Strip leading zeros, or we interpret in octal
Copy link
Member

Choose a reason for hiding this comment

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

Is there a way we can keep this as it was? The echo and sed makes it pretty clear what's happening, but this new way seems kind of exotic to me?

Not a blocker though, the comment says what it does, so i guess it's ok

Copy link
Member Author

Choose a reason for hiding this comment

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

@ANeumann82 I actually think what you had was easier to read or understand as well :( shellcheck failure

@kensipe kensipe merged commit abb0264 into main Jul 10, 2020
@kensipe kensipe deleted the ken/sh-linting branch July 10, 2020 14: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.

None yet

2 participants