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 shellcheck-py to pre-commit #251

Open
jbampton opened this issue Oct 31, 2024 · 2 comments
Open

Add shellcheck-py to pre-commit #251

jbampton opened this issue Oct 31, 2024 · 2 comments
Assignees
Milestone

Comments

@jbampton
Copy link
Member

https://pypi.org/project/shellcheck-py/

@jbampton
Copy link
Member Author

jbampton commented Nov 5, 2024

shellcheck...............................................................Failed
- hook id: shellcheck
- exit code: 1

In .bashrc line 1:
alias salam="/mnt/c/Users/MAX/Salam/src/main"
^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.


In .bashrc line 3:
source ~/.bashrc
       ^-------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.


In src/build-linux.sh line 36:
        if [ $? -ne 0 ]; then
             ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.


In src/build-linux.sh line 44:
gcc -o "$output" *.o
                 ^-- SC2035 (info): Use ./*glob* or -- *glob* so names with dashes won't become options.


In src/build-linux.sh line 45:
if [ $? -ne 0 ]; then
     ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.


In src/build-linux.sh line 56:
if [ $? -ne 0 ]; then
     ^-- SC2181 (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.


In src/build-mac.sh line 1:

^-- SC2148 (error): Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.


In src/build-webassembly.sh line 45:
if [ $? -eq 0 ]; then
     ^-- SC2181 (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.

For more information:
  https://www.shellcheck.net/wiki/SC2148 -- Tips depend on target shell and y...
  https://www.shellcheck.net/wiki/SC1090 -- ShellCheck can't follow non-const...
  https://www.shellcheck.net/wiki/SC2035 -- Use ./*glob* or -- *glob* so name...

@jbampton
Copy link
Member Author

jbampton commented Nov 5, 2024

Hey @BaseMax can you clean up these errors ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants