Skip to content

Quickstart

  1. Lint the workspace

    Terminal window
    skif # the workspace or package containing the current directory
    skif path/to/pkg # the nearest ancestor workspace that lists it, else the package itself
    skif -r # every workspace and standalone package at or below the current directory

    A package needs no workspace to be linted. Run skif at the top of a repository of independent projects, or pass -r, to lint all of them in one run.

  2. Write a starter configuration

    Terminal window
    skif init

    skif init writes a commented skif.toml with a #:schema directive, so editors with Taplo or Even Better TOML validate and complete the file. It refuses to overwrite an existing configuration.

  3. Apply fixes

    Terminal window
    skif --fix # safe fixes, lint again, then run the package manager's install
    skif --fix-unsafe # also apply unsafe fixes
    skif --fix --dry-run # print the planned changes as a diff; writes nothing

    --fix is refused when CI is truthy, unless --dry-run is set. Pass --no-install to skip the install step.

  4. Tune rules

    Terminal window
    skif --rule unsorted-dependencies=off --fail-on-warnings
    skif rules # list every rule
  5. Run it in CI

    - uses: actions/checkout@v7
    - uses: polylint/skif@v0.8
    with:
    fail-on-warnings: true
Terminal window
skif --format json # one JSON document on stdout
skif --format sarif --output skif.sarif # code scanning
skif --format github # workflow annotations
skif --format codeclimate --output gl-code-quality.json # GitLab Code Quality
skif --format markdown # a pull request comment
skif --format compact # one line per finding