mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-30 19:13:55 +00:00
shellcheck: move common directives to .shellcheckrc
This simplifies our CI command line and makes it easier to document expected usage (in HACKING.md). There unfortunately isn't a way to set --checked-sourced or our default warning level in .shellcheckrc, and our `find` command is still a bit unwieldy, but this is still a net improvement.
This commit is contained in:
22
HACKING.md
22
HACKING.md
@@ -164,6 +164,28 @@ alejandra .
|
||||
|
||||
Make sure your Alejandra version matches the version of Alejandra in [devShell.nix](https://github.com/ghostty-org/ghostty/blob/main/nix/devShell.nix).
|
||||
|
||||
### ShellCheck
|
||||
|
||||
Bash scripts are checked with [ShellCheck](https://www.shellcheck.net/) in CI.
|
||||
|
||||
Nix users can use the following command to run ShellCheck over all of our scripts:
|
||||
|
||||
```
|
||||
nix develop -c shellcheck \
|
||||
--check-sourced \
|
||||
--severity=warning \
|
||||
$(find . \( -name "*.sh" -o -name "*.bash" \) -type f ! -path "./zig-out/*" ! -path "./macos/build/*" ! -path "./.git/*" | sort)
|
||||
```
|
||||
|
||||
Non-Nix users can [install ShellCheck](https://github.com/koalaman/shellcheck#user-content-installing) and then run:
|
||||
|
||||
```
|
||||
shellcheck \
|
||||
--check-sourced \
|
||||
--severity=warning \
|
||||
$(find . \( -name "*.sh" -o -name "*.bash" \) -type f ! -path "./zig-out/*" ! -path "./macos/build/*" ! -path "./.git/*" | sort)
|
||||
```
|
||||
|
||||
### Updating the Zig Cache Fixed-Output Derivation Hash
|
||||
|
||||
The Nix package depends on a [fixed-output
|
||||
|
||||
Reference in New Issue
Block a user