Skip to content

nektro/ziglint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0121313 · Nov 25, 2023

History

95 Commits
Aug 4, 2023
Feb 11, 2023
Nov 25, 2023
Jan 6, 2022
Nov 16, 2022
Jan 8, 2022
Aug 4, 2023
Aug 4, 2023
Nov 25, 2023
Nov 25, 2023
Nov 25, 2023
Nov 25, 2023

Repository files navigation

ziglint

loc 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/ folder for examples of the caught lints.

Installation

This requires having Zig and Zigmod installed.

$ zigmod aq install 1/nektro/ziglint

Built With

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/vars

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

About

A linting suite for Zig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages