mirror of
https://github.com/google/go-jsonnet.git
synced 2025-08-07 14:57:24 +02:00
updated pre-commit config and readme
This commit is contained in:
parent
1b7cbff4cd
commit
ece9c5dc94
@ -1,7 +1,15 @@
|
|||||||
# How to use pre-commit hook: https://pre-commit.com
|
|
||||||
- id: jsonnet-format
|
- id: jsonnet-format
|
||||||
name: Format fix for jsonnet/libsonnet files
|
name: jsonnetfmt
|
||||||
entry: jsonnetfmt -i
|
description: Automatically format jsonnet files.
|
||||||
|
entry: jsonnetfmt
|
||||||
|
args: [-i]
|
||||||
language: golang
|
language: golang
|
||||||
files: '\.(jsonnet|libsonnet)$'
|
files: \.(jsonnet|libsonnet)$
|
||||||
additional_dependencies: [ "github.com/google/go-jsonnet/cmd/jsonnetfmt" ]
|
minimum_pre_commit_version: 2.10.1
|
||||||
|
- id: jsonnet-lint
|
||||||
|
name: jsonnet-lint
|
||||||
|
description: Lint jsonnet files.
|
||||||
|
entry: jsonnet-lint
|
||||||
|
language: golang
|
||||||
|
files: \.(jsonnet|libsonnet)$
|
||||||
|
minimum_pre_commit_version: 2.10.1
|
||||||
|
@ -25,6 +25,15 @@ It's also available on Homebrew:
|
|||||||
brew install go-jsonnet
|
brew install go-jsonnet
|
||||||
```
|
```
|
||||||
|
|
||||||
|
`jsonnetfmt` and `jsonnet-lint` are also available as [pre-commit](https://github.com/pre-commit/pre-commit) hooks. Example `.pre-commit-config.yaml`:
|
||||||
|
```yaml
|
||||||
|
- repo: https://github.com/google/go-jsonnet
|
||||||
|
rev: # ref you want to point at, e.g. v0.17.0
|
||||||
|
hooks:
|
||||||
|
- id: jsonnet-format
|
||||||
|
- id: jsonnet-lint
|
||||||
|
```
|
||||||
|
|
||||||
## Build instructions (go 1.11+)
|
## Build instructions (go 1.11+)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user