thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

Add shellcheck action, fix issues

Open matthiasbeyer opened this issue 1 year ago • 3 comments

This PR adds a shellcheck job. Shellcheck is reasonably fast that this does not impact our CI time at all.

This PR also fixes most issues shellcheck reports. The ones I did not fix here are issues where I don't know how to go forward and might need some investigation from someone who knows better.

matthiasbeyer avatar Aug 06 '22 07:08 matthiasbeyer

Ah, we should probably fix the remaining ones in this PR as well.

Right now there are 23 issues left that we need to fix before the job succeeds.

matthiasbeyer avatar Aug 06 '22 07:08 matthiasbeyer

That does mean we need to fix things now because this PR is not ready yet, there are still warnings and errors in shell scripts.

matthiasbeyer avatar Aug 09 '22 16:08 matthiasbeyer

Can someone please tell me what to do about

matthiasbeyer avatar Aug 11 '22 12:08 matthiasbeyer

I am going to file issues for the things that are ignored in 5be1243, 4e52a28 and ea85c68 after this is merged.

matthiasbeyer avatar Aug 16 '22 14:08 matthiasbeyer

The variable name is misleading but seems correct. This is supposed to run in an environment where some variable have been exported ($C8YDEVICE, but also $C8YUSERNAME ...). A way to fix the issue would be to add an explicit check at the beginning of the script to enforce these variables to be actually set.

These two seem more related to shellcheck configuration or script organisation.

didier-wenzek avatar Aug 18 '22 13:08 didier-wenzek

Squashed. :tada:

matthiasbeyer avatar Aug 18 '22 16:08 matthiasbeyer