{"id":41824159,"url":"https://github.com/forketyfork/zwanzig","last_synced_at":"2026-02-03T16:12:07.837Z","repository":{"id":334177192,"uuid":"1137242502","full_name":"forketyfork/zwanzig","owner":"forketyfork","description":"A static analyzer and linter for Zig","archived":false,"fork":false,"pushed_at":"2026-01-23T21:50:03.000Z","size":442,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T00:37:15.849Z","etag":null,"topics":["code-quality","linter","static-analysis","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/forketyfork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-01-19T05:38:40.000Z","updated_at":"2026-01-23T21:09:24.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/forketyfork/zwanzig","commit_stats":null,"previous_names":["forketyfork/zwanzig"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/forketyfork/zwanzig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forketyfork%2Fzwanzig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forketyfork%2Fzwanzig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forketyfork%2Fzwanzig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forketyfork%2Fzwanzig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/forketyfork","download_url":"https://codeload.github.com/forketyfork/zwanzig/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/forketyfork%2Fzwanzig/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28748573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T07:58:02.558Z","status":"ssl_error","status_checked_at":"2026-01-25T07:57:57.153Z","response_time":113,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-quality","linter","static-analysis","zig"],"created_at":"2026-01-25T08:05:54.171Z","updated_at":"2026-02-03T16:12:07.820Z","avatar_url":"https://github.com/forketyfork.png","language":"Zig","readme":"# zwanzig\n\n[![Build status](https://github.com/forketyfork/zwanzig/actions/workflows/build.yml/badge.svg)](https://github.com/forketyfork/zwanzig/actions/workflows/build.yml)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Zig](https://img.shields.io/badge/language-Zig-f7a41d.svg)](https://ziglang.org/)\n\nZwanzig is a static analyzer and linter for Zig code, combining fast AST/token rules with CFG-driven analysis built on ZIR output.\n\n## Quick usage\n\n### Local\n\n```bash\nzig build\nzig build run -- src/\n```\n\n### GitHub Actions (SARIF)\n\n```yaml\npermissions:\n  contents: read\n  security-events: write\n\n- name: Run zwanzig analysis\n  run: |\n    zig build run -- --format sarif src/ \u003e results.sarif || true\n\n- name: Upload SARIF results\n  uses: github/codeql-action/upload-sarif@v3\n  with:\n    sarif_file: results.sarif\n```\n\n## Features\n\n- Rule/checker registration with shared `--do`/`--skip` filtering\n- Lazy parsing with cached AST/tokens per file\n- Type-aware analysis via ZIR\n- CFG-based, path-sensitive checkers\n- Graphviz DOT dumps for CFGs, exploded graphs, and path traces\n- Parallel analysis across files\n\n## Rules\n\nAST/token rules:\n\n- dupe-import: duplicate `@import` statements\n- todo: `// TODO` comments\n- file-as-struct: file naming based on struct-like top-level fields\n- unused-decl: unused container-level declarations\n- unused-parameter: unused function parameters\n- unreachable-code: code after unconditional terminators or fully terminating branches\n- empty-defer: empty `defer {}` blocks\n- empty-errdefer: empty `errdefer {}` blocks\n- shadowed-variable: name reuse across scopes\n- sentinel-alloc: sentinel-terminated allocations losing sentinel type\n- identifier-style: naming conventions for types/functions/values\n\nEngine-backed checkers:\n\n- unreachable-code-engine: constant-condition unreachable code\n- optional-unwrap: forced optional unwraps with `.?`\n- empty-catch-engine: empty `catch {}` blocks\n- swallowed-error: catch blocks that ignore errors without rethrowing or logging\n- store-violations-engine: allocator/resource misuse (double-free, leaks, use-after-free/close)\n- stack-escape-engine: stack-backed values escaping via return or async/thread capture\n\n## Limitations\n\n- ZIR/type info requires valid, parseable Zig code\n- Full type resolution needs complete build context; standalone analysis has limited type inference\n- Nested-scope type info is still limited to module-level declarations\n- Interprocedural analysis is limited to simple direct calls in a single file; cross-file calls are treated as external\n- Incremental cache stores metadata only; CFG caching is planned but not yet wired in\n\n## Docs\n\n- Usage and CLI: [docs/USAGE.md](docs/USAGE.md)\n- Configuration: [docs/CONFIG.md](docs/CONFIG.md)\n- Output formats: [docs/OUTPUT.md](docs/OUTPUT.md)\n- CI integration: [docs/CI.md](docs/CI.md)\n- Inline suppressions: [docs/SUPPRESSIONS.md](docs/SUPPRESSIONS.md)\n- Development notes: [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md)\n- Rules and checker details: [docs/RULES.md](docs/RULES.md)\n- Implementation notes: [docs/IMPLEMENTATION.md](docs/IMPLEMENTATION.md)\n- CFG/analysis visualization: [docs/VISUALIZATION.md](docs/VISUALIZATION.md)\n- Release process: [docs/RELEASE.md](docs/RELEASE.md)\n- Sample config: [docs/zwanzig.sample.json](docs/zwanzig.sample.json)\n\n## License\n\nMIT\n","funding_links":[],"categories":["Fundamentals"],"sub_categories":["Linters"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforketyfork%2Fzwanzig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fforketyfork%2Fzwanzig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fforketyfork%2Fzwanzig/lists"}