Skip to content

Fixes for ShellCheck errors#6

Closed
atrepca wants to merge 1 commit intothomasfr:mainfrom
atrepca:main
Closed

Fixes for ShellCheck errors#6
atrepca wants to merge 1 commit intothomasfr:mainfrom
atrepca:main

Conversation

@atrepca
Copy link

@atrepca atrepca commented Mar 4, 2023

Running the script through the shellcheck static analysis tool returns the errors below:

$ shellcheck run.sh 

In run.sh line 1:
#!/usr/bin/with-contenv bashio
^-- SC1008 (error): This shebang was unrecognized. ShellCheck only supports sh/bash/dash/ksh. Add a 'shell' directive to specify.


In run.sh line 17:
export AWS_ACCESS_KEY_ID="$(bashio::config 'aws_access_key')"
       ^---------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.


In run.sh line 18:
export AWS_SECRET_ACCESS_KEY="$(bashio::config 'aws_secret_access_key')"
       ^-------------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

For more information:
  https://www.shellcheck.net/wiki/SC1008 -- This shebang was unrecognized. Sh...
  https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...

SC2155 is detailed here, and SC1008 here.

ShellCheck can also run as a GitHub action.

Also removed the executable bit from other non-executables that had it.

Copy link
Owner

@thomasfr thomasfr left a comment

Choose a reason for hiding this comment

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

Thank you very much. Did not know shellcheck tbh and was not aware of SC2155. So thanks for that.
If you or someone else interested in contributing, i would also accept a PR for enabling ShellCheck within Github Actions.

@atrepca atrepca force-pushed the main branch 2 times, most recently from 7539d1b to 780e9b4 Compare October 24, 2024 16:34
@atrepca
Copy link
Author

atrepca commented Oct 24, 2024

Going to close this and fix the ShellCheck errors in #20 so the action starts with a clean state.

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.

2 participants