Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nektro/ziglint
A linting suite for Zig
https://github.com/nektro/ziglint
lint linter zig
Last synced: about 2 months ago
JSON representation
A linting suite for Zig
- Host: GitHub
- URL: https://github.com/nektro/ziglint
- Owner: nektro
- License: mit
- Created: 2021-08-23T02:16:09.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-11-25T18:38:12.000Z (about 1 year ago)
- Last Synced: 2024-10-15T02:34:39.548Z (about 2 months ago)
- Topics: lint, linter, zig
- Language: Zig
- Homepage:
- Size: 89.8 KB
- Stars: 87
- Watchers: 3
- Forks: 3
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - nektro/ziglint
README
# ziglint
![loc](https://sloc.xyz/github/nektro/ziglint)
[![license](https://img.shields.io/github/license/nektro/ziglint.svg)](https://github.com/nektro/ziglint/blob/master/LICENSE)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/](./bad/) folder for examples of the caught lints.
## Installation
This requires having [Zig](https://ziglang.org) and [Zigmod](https://github.com/nektro/zigmod) installed.- https://ziglang.org/download/
- https://github.com/nektro/zigmod/releases```sh
$ zigmod aq install 1/nektro/ziglint
```## Built With
- Zig master `0.11.0`
- [Zigmod](https://github.com/nektro/zigmod) package manager
- See [`zig.mod`](./zig.mod)# Available Rules
- `dupe_import`: warn against duplicate `@import` calls with the same value
- `todo`: list all `// TODO` comments
- `file_as_struct`: checks for file name capitalization in the presence of top level fields
- `unused_decl`: checks for unused container level `const`/`var`sWant to propose more? Open an issue here on Github.
## Using in Github Actions
```yml
jobs:
lint:
runs-on: ubuntu-lateststeps:
- 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