Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/synthetica9/nix-linter
Linter for the Nix expression language
https://github.com/synthetica9/nix-linter
haskell linter nix nixpkgs
Last synced: 26 days ago
JSON representation
Linter for the Nix expression language
- Host: GitHub
- URL: https://github.com/synthetica9/nix-linter
- Owner: Synthetica9
- License: bsd-3-clause
- Created: 2018-10-02T18:35:00.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-27T05:56:07.000Z (over 1 year ago)
- Last Synced: 2024-09-28T09:20:14.830Z (about 1 month ago)
- Topics: haskell, linter, nix, nixpkgs
- Language: Haskell
- Homepage:
- Size: 436 KB
- Stars: 159
- Watchers: 8
- Forks: 16
- Open Issues: 24
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `nix-linter`
[![Build Status](https://travis-ci.org/Synthetica9/nix-linter.svg?branch=master)](https://travis-ci.org/Synthetica9/nix-linter)
`nix-linter` is a program to check for several common mistakes or stylistic
errors in Nix expressions, such as unused arguments, empty let blocks,
etcetera.## Usage
First, setup cachix:
```sh
cachix use nix-linter
```Then clone the repo and `cd` into it:
```sh
git clone https://github.com/Synthetica9/nix-linter
cd nix-linter
```Finally, you can run the application with:
```sh
$(nix-build -A nix-linter)/bin/nix-linter --help```
```
The nix-linter programnix-linter [OPTIONS] [FILES]
Common flags:
-W --check=ITEM checks to enable
-j --json Use JSON output
-J --json-stream Use a newline-delimited stream of JSON objects
instead of a JSON list (implies --json)
-r --recursive Recursively walk given directories (like find)
-o --out[=FILE] File to output to
-h --help-for=CHECKS
-? --help Display help message
-V --version Print version information
-v --verbose Loud verbosity
-q --quiet Quiet verbosityAvailable checks (See `nix-linter --help-for [CHECK]` for more details):
DIYInherit
EmptyInherit
EmptyLet
EtaReduce
FreeLetInFunc
LetInInheritRecset
ListLiteralConcat
NegateAtom
SequentialLet
SetLiteralUpdate
UnfortunateArgName
UnneededRec
UnusedArg
UnusedLetBind
UpdateEmptySet
AlphabeticalArgs (disabled by default)
AlphabeticalBindings (disabled by default)
BetaReduction (disabled by default)
EmptyVariadicParamSet (disabled by default)
UnneededAntiquote (disabled by default)```