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

Add "code" (shell) linter and format checker #32

Merged
merged 7 commits into from
Nov 13, 2024

Conversation

paulo-ferraz-oliveira
Copy link
Collaborator

This uses:

behind the scenes.

After #1 is merged I don't mind either relaxing the rules or adapting the code. I've found, over use, that at least ShellCheck is very good at catching error-prone patterns and even helping make it more readable.

Closes #13.
Closes #14.

This uses:

- shellcheck
- shfmt

behind the scenes
@paulo-ferraz-oliveira
Copy link
Collaborator Author

Now that #1 is out this is rebased on top of the default branch.

@paulo-ferraz-oliveira
Copy link
Collaborator Author

Branch is updated and rebased on top of the default branch. Lemme know what you want relaxed, commented, removed, etc.

@@ -118,7 +118,7 @@ test_otp() {
{ok, _} = application:ensure_all_started(crypto), io:format("crypto ok~n"),
halt().'

if dyld_info ${OTP_DIR}/lib/crypto-*/priv/lib/crypto.so | tail -n +2 | grep -q openssl; then
if dyld_info "${OTP_DIR}/lib/crypto-*/priv/lib/crypto.so" | tail -n +2 | grep -q openssl; then
Copy link
Member

Choose a reason for hiding this comment

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

That's handy!

Copy link
Member

@starbelly starbelly left a comment

Choose a reason for hiding this comment

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

LGTM

@paulo-ferraz-oliveira
Copy link
Collaborator Author

As with the other one, I'm merging and it should be easy to revert if it causes issues in the default branch.

@paulo-ferraz-oliveira paulo-ferraz-oliveira merged commit 14c4eb4 into main Nov 13, 2024
1 check passed
@paulo-ferraz-oliveira paulo-ferraz-oliveira deleted the feature/checks branch November 13, 2024 18:50
@@ -0,0 +1,34 @@
---
"on":
Copy link
Collaborator

Choose a reason for hiding this comment

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

"on"

I'm not a fan of this particular change but I get it and it's obviously not a deal breaker. Thank you for the PR!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can revert it. It's an option for the linter. I'll do it.

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.

Project maintenance: shellcheck Project maintenance: shfmt
3 participants