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

ci: enforce shellcheck and shfmt #4926

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/sh-checker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: SH Checker

Check notice

Code scanning / Checkov (reported by Codacy)

Ensure top-level permissions are not set to write-all Note

Ensure top-level permissions are not set to write-all
on:
- pull_request
jobs:
sh-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run the sh-checker
uses: luizm/action-sh-checker@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SHELLCHECK_OPTS: -o all -e 2148 -e SC2033 -e SC2032 -e SC2034 -e SC2154 -e SC2312 -e SC2164
SHFMT_OPTS: -s -i 2 -bn -ci -sr -s
with:
sh_checker_comment: true
sh_checker_exclude: "packages/emacs/emacs.pacscript packages/emacs-git/emacs-git.pacscript"
Copy link
Member

Choose a reason for hiding this comment

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

is this list going to grow ever longer?

Copy link
Member Author

Choose a reason for hiding this comment

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

Unless there is a specific request, no. We only added it because Wizard wanted some comments to be visually aligned.

2 changes: 1 addition & 1 deletion packages/dust-bin/dust-bin.pacscript
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ package() {
}

post_remove() {
# Remove empty directories
# Remove empty directories
sudo rm -rf "/usr/share/licenses/${pkgname}"
sudo rm -rf "/usr/share/doc/${pkgname}"
}
Expand Down
Loading