Skip to content

Add ShellCheck CI for shell scripts / Kabuk betikleri için ShellCheck denetimi - #13

Merged
schematrix merged 2 commits into
schematrix:mainfrom
efeesrefinal:ci/shellcheck
Nov 6, 2026
Merged

schematrix merged 2 commits into
schematrix:mainfrom
efeesrefinal:ci/shellcheck

Conversation

@efeesrefinal

Copy link
Copy Markdown
Contributor

EN

Adds a GitHub Actions workflow that runs ShellCheck on every *.sh file on pushes to main and on pull requests. The scripts here run as root and format disks, so catching quoting and word-splitting mistakes before they reach a Pi seemed worth a small check. It uses --severity=warning, so style-only notes (like SC2001 in install.sh) do not fail the build.

The only existing warning was SC2046 in scripts/setup-ssd.sh (unquoted $(date ...) in the fstab backup path), so this PR quotes it and the check starts green. That line is not touched by #4, so there is no conflict.

The workflow uses the ShellCheck that ships with the ubuntu-latest runner, has read-only permissions and needs no secrets.

TR

main'e yapılan her push'ta ve her PR'da tüm *.sh dosyalarını ShellCheck ile denetleyen bir GitHub Actions iş akışı ekler. Buradaki betikler root olarak çalışıyor ve disk formatlıyor; tırnak ve kelime bölünmesi hatalarını Pi'ye ulaşmadan yakalamak için küçük bir denetim faydalı olur diye düşündüm. --severity=warning kullanır, yani yalnızca biçimle ilgili notlar (install.sh'deki SC2001 gibi) derlemeyi düşürmez.

Mevcut tek uyarı scripts/setup-ssd.sh içindeki SC2046'ydı (fstab yedek yolunda tırnaksız $(date ...)). Bu PR onu tırnak içine alıyor, böylece denetim yeşil başlıyor. #4 bu satıra dokunmadığı için çakışma yok.

İş akışı ubuntu-latest üzerinde hazır gelen ShellCheck'i kullanır, yalnızca okuma izni vardır ve gizli anahtar gerektirmez.

Runs ShellCheck on every *.sh file on pushes to main and on pull requests,
so quoting and word-splitting mistakes in the installer scripts are caught
before they reach a Pi. Uses --severity=warning to skip style-only notes.

Also quotes the fstab backup path in setup-ssd.sh, the only existing
warning (SC2046), so the check starts green.
@schematrix

schematrix commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Teşekkürler! #10'da da benzer bir workflow var, ikisinden birini seçeceğim. Bir de actions/checkout@v7 henüz yoksa @v4 yapabilir misin? Check yeşil yanarsa merge ederim.

Thanks! #10 has a similar workflow too, so I'll go with one of them. Also, if actions/checkout@v7 doesn't exist yet, could you switch it to @v4? If the check goes green I'll merge it.

@efeesrefinal

Copy link
Copy Markdown
Contributor Author

actions/checkout@v7 mevcut, son sürüm v7.0.1: https://github.com/actions/checkout/releases/tag/v7.0.1
O yüzden öyle bıraktım, ama v4 istersen hemen değiştiririm.

Check henüz çalışmadı: ilk katkıda workflow'ların çalışması için Actions sekmesinde "Approve and run" demen gerekiyor.

#10'un son halinde ShellCheck çıkarılmış (yalnız README.md ve www/home/index.html var), yani workflow şu an yalnız bu PR'da.


actions/checkout@v7 exists, the latest release is v7.0.1: https://github.com/actions/checkout/releases/tag/v7.0.1
So I left it as is, but I'm happy to switch to v4 if you prefer.

The check hasn't run yet: for a first-time contributor, workflows need "Approve and run" in the Actions tab.

#10 no longer includes ShellCheck (it only touches README.md and www/home/index.html), so this PR is the only one with the workflow now.

@schematrix

Copy link
Copy Markdown
Owner

Haklıymışsın, v7 varmış, kontrol ettiğin için teşekkürler. Öyle kalsın. Workflow'u da şimdi onaylıyorum, yeşil yanarsa ve uygun görürsem merge ederim.


You were right, v7 does exist, thanks for checking. Let's keep it as is. I'm approving the workflow now, and if it goes green and everything looks good, I'll merge it.

@schematrix

Copy link
Copy Markdown
Owner

Onaylamaya gittim ama bekleyen bir çalıştırma görünmüyor. Boş bir commit atabilir misin, workflow tetiklensin, ben de onaylayayım.


I went to approve it but there's no pending run. Could you push an empty commit so the workflow triggers? Then I'll approve it.

@efeesrefinal

Copy link
Copy Markdown
Contributor Author

Boş bir commit attım. Hâlâ bekleyen çalıştırma görünmezse repoda Actions kapalı olabilir: Settings > Actions > General altında "Allow all actions and reusable workflows" seçili mi bakabilir misin? Repoda henüz hiç workflow çalışmamış görünüyor.


Pushed an empty commit. If there's still no pending run, Actions may be disabled for the repo: could you check that "Allow all actions and reusable workflows" is selected under Settings > Actions > General? The repo doesn't seem to have had any workflow runs yet.

@schematrix

Copy link
Copy Markdown
Owner

Merhaba efeesrefinal, çok teşekkür ederim. Merge etmeden önce aynı kontrolü Pi'de, bugünkü main'in üzerine PR'ını ekleyerek çalıştırdım. Main'de tek bir uyarı vardı, setup-ssd.sh içindeki fstab yedek satırı. Senin PR'ın tam olarak onu düzeltiyor, birleşince ShellCheck hiç uyarı vermedi. Actions burada bir türlü tetiklenmediği için sabrın için de ayrıca teşekkürler. Bundan sonra gelen her PR otomatik olarak denetlenecek, bu proje için çok değerli bir katkı oldu.


Hi efeesrefinal, thank you very much. Before merging I ran the same check on the Pi, with your PR applied on top of today's main. Main had a single warning, the fstab backup line in setup-ssd.sh, and your PR fixes exactly that, so after merging ShellCheck reports no warnings at all. Thanks also for your patience, since Actions never triggered here. From now on every new PR will be checked automatically, which is a really valuable contribution to the project.

@schematrix
schematrix merged commit 2507c1d into schematrix:main Nov 6, 2026
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