-
Notifications
You must be signed in to change notification settings - Fork 299
ci: add shellcheck to CI and pre-commit hook #68
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
base: main
Are you sure you want to change the base?
Changes from all commits
c72b10f
8799d20
8eb510b
0c7f831
d726844
7c32538
1b7bec3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,20 @@ | ||||||
| name: Shellcheck | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| paths: | ||||||
| - "**.sh" | ||||||
| pull_request: | ||||||
| paths: | ||||||
| - "**.sh" | ||||||
|
Comment on lines
+1
to
+9
|
||||||
|
|
||||||
| jobs: | ||||||
| shellcheck: | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Run shellcheck | ||||||
| uses: ludeeus/action-shellcheck@master | ||||||
|
||||||
| uses: ludeeus/action-shellcheck@master | |
| uses: ludeeus/action-shellcheck@2.0.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| [package] | ||
| name = "localcowork" | ||
| version = "0.1.0" | ||
| description = "LocalCowork — on-device AI agent desktop app" | ||
| authors = ["LocalCowork Contributors"] | ||
| license = "MIT" | ||
| edition = "2021" | ||
| rust-version = "1.77" | ||
|
|
||
| [build-dependencies] | ||
| tauri-build = { version = "2", features = [] } | ||
|
|
||
| [dependencies] | ||
| tauri = { version = "2", features = ["devtools"] } | ||
| tauri-plugin-shell = "2" | ||
| serde = { version = "1", features = ["derive"] } | ||
| serde_json = "1" | ||
| serde_yaml = "0.9" | ||
| tokio = { version = "1", features = ["full"] } | ||
| anyhow = "1" | ||
| thiserror = "2" | ||
| tracing = "0.1" | ||
| tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] } | ||
| uuid = { version = "1", features = ["v4"] } | ||
| chrono = { version = "0.4", features = ["serde"] } | ||
| reqwest = { version = "0.12", features = ["json", "stream"] } | ||
| rusqlite = { version = "0.32", features = ["bundled"] } | ||
| futures = "0.3" | ||
| dirs = "6" | ||
| sysinfo = "0.33" | ||
| sha2 = "0.10" | ||
| tauri-plugin-dialog = "2" | ||
|
|
||
| [dev-dependencies] | ||
| tempfile = "3" | ||
|
|
||
| [features] | ||
| default = ["custom-protocol"] | ||
| custom-protocol = ["tauri/custom-protocol"] | ||
|
|
||
| [profile.release] | ||
| strip = true | ||
| lto = true | ||
| codegen-units = 1 | ||
| panic = "abort" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| fn main() { | ||
| tauri_build::build(); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| { | ||
| "identifier": "default", | ||
| "description": "Default capabilities for LocalCowork", | ||
| "windows": ["main"], | ||
| "permissions": [ | ||
| "core:default", | ||
| "shell:allow-open", | ||
| "shell:allow-execute", | ||
| "shell:allow-spawn", | ||
| "shell:allow-stdin-write", | ||
| "dialog:default", | ||
| "dialog:allow-open", | ||
| "dialog:allow-save" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| <?xml version="1.0" encoding="UTF-8"?> | ||
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" | ||
| "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
| <plist version="1.0"> | ||
| <dict> | ||
| <!-- Allow spawning child processes (Node.js/Python MCP servers) --> | ||
| <key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
| <true/> | ||
| <!-- Allow loading external dynamic libraries (Python packages, Node modules) --> | ||
| <key>com.apple.security.cs.disable-library-validation</key> | ||
| <true/> | ||
| <!-- Allow outbound network connections (localhost Ollama API) --> | ||
| <key>com.apple.security.network.client</key> | ||
| <true/> | ||
| <!-- Allow read/write to user-selected files (via open/save dialogs) --> | ||
| <key>com.apple.security.files.user-selected.read-write</key> | ||
| <true/> | ||
| </dict> | ||
| </plist> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "servers": {} | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Iterating with
for file in $STAGED_FILESwill break on filenames containing whitespace/globs due to word-splitting. Treat staged files as a newline-delimited list (read loop) or an array, and consider running shellcheck against the staged blob (not the working tree) so the hook validates exactly what will be committed.