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 CI workflow to check for problems with shell scripts #11

Merged
merged 5 commits into from
Dec 19, 2022

Conversation

MatteoPologruto
Copy link
Contributor

On every push or pull request that modifies one of the shell scripts in the repository, and periodically, the workflow:

  • Runs ShellCheck to detect common problems.
  • Runs shfmt to check formatting.
  • Checks for forgotten executable script file permissions.

Scripts inside subdirectories of deps have been excluded from the checks. Most of the suggestions made by ShellCheck have been applied to build_libs.sh, except for this one, since it should not be an error:

In ./deps/build_libs.sh line 3:
export PREFIX=/opt/lib/${CROSS_COMPILE}
                       ^--------------^ SC2[15](https://github.com/MatteoPologruto/crossbuild/actions/runs/3639769002/jobs/6143576989#step:7:16)3 (info): Possible misspelling: CROSS_COMPILE may not be assigned. Did you mean CROSS_COMPILER?

For more information:
  https://www.shellcheck.net/wiki/SC2153 -- Possible misspelling: CROSS_COMPI...
task: Failed to run task "shell:check": exit status 1

.github/workflows/check-shell-task.yml Outdated Show resolved Hide resolved
.github/workflows/check-shell-task.yml Outdated Show resolved Hide resolved
Taskfile.yml Outdated Show resolved Hide resolved
deps/build_libs.sh Show resolved Hide resolved
On every push or pull request that modifies one of the shell scripts in the repository, and periodically, the workflow:

- Runs ShellCheck to detect common problems.
- Runs shfmt to check formatting.
- Checks for forgotten executable script file permissions.
Copy link

@per1234 per1234 left a comment

Choose a reason for hiding this comment

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

Thanks Matteo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants