|
1 | 1 | # lint-install |
2 | 2 |
|
3 | 3 | [![GoReport Widget]][GoReport Status] |
4 | | - |
| 4 | +[](https://github.com/emersion/stability-badges#stable) |
5 | 5 |
|
6 | 6 | [GoReport Status]: https://goreportcard.com/report/github.com/tinkerbell/lint-install |
7 | 7 | [GoReport Widget]: https://goreportcard.com/badge/github.com/tinkerbell/lint-install |
8 | 8 |
|
9 | | -Install well-configured linters to your project in a consistent and repeatable way. This tool specifically supports creating and updating `Makefile` |
10 | | -targets, and lints the following: |
| 9 | +Idiomatic linters for opinionated projects. |
| 10 | + |
| 11 | +This tool installs well-configured linters to any project, open-source or |
| 12 | +otherwise. The linters can be used in a repeatable and consistent way across CI, |
| 13 | +local tests, and IDE's. |
| 14 | + |
| 15 | +lint-install adds linter configuration to the root of your project, and Makefile |
| 16 | +rules to install a consistently versioned set of linters to be used in any |
| 17 | +environment. These Makefile rules can also be upgrading by lint-install, updating |
| 18 | +all environments simultaneously. |
| 19 | + |
| 20 | +Currently supported languages: |
11 | 21 |
|
12 | 22 | - Go |
13 | 23 | - Shell |
14 | 24 | - Dockerfile |
| 25 | +- YAML |
15 | 26 |
|
16 | 27 | ## Philosophy |
17 | 28 |
|
18 | | -Catch as many errors as possible, but be idiomatic to the language. |
| 29 | +- Catch all the bugs! |
| 30 | +- Improve readability as much as possible. |
| 31 | +- Be idiomatic: only raise issues that the language authors would flag |
19 | 32 |
|
20 | 33 | ## Usage |
21 | 34 |
|
22 | | -``` |
23 | | -go get github.com/tinkerbell/lint-install |
24 | | -$HOME/go/bin/lint-install <repo> |
25 | | -``` |
| 35 | +Installation: |
| 36 | + |
| 37 | +`go get github.com/tinkerbell/lint-install` |
| 38 | + |
| 39 | +Add Makefile rules for a git repository: |
| 40 | + |
| 41 | +`$HOME/go/bin/lint-install <repo>` |
| 42 | + |
| 43 | +Users can then lint the project using: |
| 44 | + |
| 45 | +`make lint` |
26 | 46 |
|
27 | | -## Options |
| 47 | +Other options: |
28 | 48 |
|
29 | | -* `--dry-run`: Log what changes would be made if any |
30 | | -* `--shell=warn`: Make shell warnings non-fatal |
31 | | -* `--dockerfile=warn`: Make Dockerfile warnings non-fatal |
32 | | -* `--go=warn`: Make Dockerfile warnings non-fatal |
| 49 | + -dockerfile string |
| 50 | + Level to lint Dockerfile with: [ignore, warn, error] (default "error") |
| 51 | + -dry-run |
| 52 | + Display changes to make |
| 53 | + -go string |
| 54 | + Level to lint Go with: [ignore, warn, error] (default "error") |
| 55 | + -makefile string |
| 56 | + name of Makefile to update (default "Makefile") |
| 57 | + -shell string |
| 58 | + Level to lint Shell with: [ignore, warn, error] (default "error") |
| 59 | + -yaml string |
| 60 | + Level to lint YAML with: [ignore, warn, error] (default "error") |
0 commit comments