1/nektro/ziglint v0.25
A linting suite for Zig
ziglint
A linting suite for Zig.
Usage
$ ./ziglint
This will search the current directory for .zig
files and lint them against the various tests in the suite. See the bad/ folder for examples of the caught lints.
Installation
This requires having Zig and Zigmod installed.
- https://ziglang.org/download/
- https://github.com/nektro/zigmod/releases
$ zigmod aq install 1/nektro/ziglint
Built With
Available Rules
dupe_import
: warn against duplicate@import
calls with the same valuetodo
: list all// TODO
commentsfile_as_struct
: checks for file name capitalization in the presence of top level fieldsunused_decl
: checks for unused container levelconst
/var
s
Want to propose more? Open an issue here on Github.
Using in Github Actions
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Zig
uses: goto-bus-stop/setup-zig@v1
with:
version: "0.11.0"
- uses: nektro/actions-setup-zigmod@v1
- run: zigmod aq install 1/nektro/ziglint
- run: ~/.zigmod/bin/ziglint -skip todo
License
MIT
Package Contents
- .gitattributes
- licenses.txt
- zigmod.lock
- LICENSE
- .github/workflows/zig.yml
- .github/issue_template/fakse_negative.yml
- .github/issue_template/new_rule.yml
- .github/issue_template/false_positive.yml
- build.zig
- src/rules/unused.zig
- src/rules/todo.zig
- src/rules/file_as_struct.zig
- src/rules/dupe_import.zig
- src/astx.zig
- src/main.zig
- README.md
- zig.mod
- bad/unused_function.zig
- bad/todo.zig
- bad/file_as_struct.zig
- bad/unused_decl.zig
- bad/dupe_import.zig
- .gitignore
Root Dependencies
-
git https://github.com/nektro/zig-flag
History
Published On | Tree @ Commit | Size | |
---|---|---|---|
v0.25 | Sat, 25 Nov 2023 18:38:14 UTC | Tree | 42.392 KB |
v0.24 | Fri, 04 Aug 2023 09:05:56 UTC | Tree | 42.821 KB |
v0.23 | Sat, 11 Feb 2023 00:20:21 UTC | Tree | 42.270 KB |
v0.22 | Sat, 11 Feb 2023 00:17:17 UTC | Tree | 42.071 KB |
v0.21 | Fri, 10 Feb 2023 23:11:14 UTC | Tree | 39.646 KB |
v0.20 | Fri, 10 Feb 2023 21:44:37 UTC | Tree | 41.365 KB |
v0.19 | Wed, 11 Jan 2023 19:02:20 UTC | Tree | 40.604 KB |
v0.18 | Wed, 16 Nov 2022 16:52:56 UTC | Tree | 40.579 KB |
v0.17 | Wed, 28 Sep 2022 22:40:46 UTC | Tree | 34.286 KB |
v0.16 | Wed, 14 Sep 2022 20:02:46 UTC | Tree | 34.311 KB |
v0.15 | Fri, 19 Aug 2022 22:56:29 UTC | Tree | 34.323 KB |
v0.14 | Mon, 01 Aug 2022 07:06:54 UTC | Tree | 34.316 KB |
v0.13 | Mon, 18 Apr 2022 00:47:26 UTC | Tree | 34.176 KB |
v0.12 | Mon, 07 Mar 2022 01:38:41 UTC | Tree | 34.156 KB |
v0.11 | Sun, 09 Jan 2022 12:02:59 UTC | Tree | 34.177 KB |
v0.10 | Sat, 08 Jan 2022 11:33:59 UTC | Tree | 12.543 KB |
v0.9 | Sat, 08 Jan 2022 01:58:04 UTC | Tree | 11.551 KB |
v0.8 | Sat, 08 Jan 2022 01:06:42 UTC | Tree | 10.212 KB |
v0.7 | Fri, 07 Jan 2022 00:10:01 UTC | Tree | 9.513 KB |
v0.6 | Thu, 06 Jan 2022 12:33:00 UTC | Tree | 7.732 KB |
v0.5 | Thu, 06 Jan 2022 02:45:17 UTC | Tree | 7.659 KB |
v0.4 | Sat, 28 Aug 2021 02:35:38 UTC | Tree | 7.659 KB |
v0.3 | Sat, 28 Aug 2021 02:32:46 UTC | Tree | 7.659 KB |
v0.2 | Fri, 27 Aug 2021 05:42:49 UTC | Tree | 6.488 KB |
v0.1 | Mon, 23 Aug 2021 02:27:55 UTC | Tree | 6.486 KB |