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

Make use of shellcheck #95

Closed
Vogtinator opened this issue Apr 13, 2022 · 2 comments · Fixed by #97
Closed

Make use of shellcheck #95

Vogtinator opened this issue Apr 13, 2022 · 2 comments · Fixed by #97

Comments

@Vogtinator
Copy link
Member

https://www.shellcheck.net checks bash (and other shell) scripts for errors and possible bugs, we could make use of that for CI.
This would probably require quite a few fixes and shellcheck ignores to make it really useful though.
Needs some experimenting.

@gmoro
Copy link
Collaborator

gmoro commented Apr 13, 2022

I tried that before, but had no time to really put it to use, would be a great addition

@Vogtinator
Copy link
Member Author

We should try to use relative source paths for inclusion to fix issues like

In files/usr/sbin/jeos-config line 23:
. "/usr/share/jeos-firstboot/jeos-firstboot-functions"
  ^-- SC1091 (info): Not following: /usr/share/jeos-firstboot/jeos-firstboot-functions was not specified as input (see shellcheck -x).

e.g. in jeos-firstboot and jeos-config do cd "$(dirname $0)" to ensure we're in the right location and then use . ../share/jeos-firstboot/.... That would also make it possible to test without installing it system-wide.

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 a pull request may close this issue.

2 participants