mirror of
https://github.com/mgechev/revive.git
synced 2025-07-15 01:04:40 +02:00
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ golinter
|
||||
revive
|
||||
vendor
|
||||
*.swp
|
||||
dist/
|
||||
|
@ -22,6 +22,18 @@ builds:
|
||||
- darwin
|
||||
- windows
|
||||
|
||||
dockers:
|
||||
- image_templates: ["ghcr.io/mgechev/revive:{{ .Version }}"]
|
||||
dockerfile: Dockerfile
|
||||
build_flag_templates:
|
||||
- --label=org.opencontainers.image.title={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.description={{ .ProjectName }}
|
||||
- --label=org.opencontainers.image.url=https://github.com/mgechev/revive
|
||||
- --label=org.opencontainers.image.source=https://github.com/mgechev/revive
|
||||
- --label=org.opencontainers.image.version={{ .Version }}
|
||||
- --label=org.opencontainers.image.revision={{ .FullCommit }}
|
||||
- --label=org.opencontainers.image.licenses=MIT
|
||||
|
||||
changelog:
|
||||
filters:
|
||||
exclude:
|
||||
|
3
Dockerfile
Normal file
3
Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM scratch
|
||||
COPY revive /usr/bin/revive
|
||||
ENTRYPOINT ["/usr/bin/revive"]
|
12
README.md
12
README.md
@ -119,6 +119,18 @@ Since the default behavior of `revive` is compatible with `golint`, without prov
|
||||
|
||||
`revive` supports a `-config` flag whose value should correspond to a TOML file describing which rules to use for `revive`'s linting. If not provided, `revive` will try to use a global config file (assumed to be located at `$HOME/revive.toml`). Otherwise, if no configuration TOML file is found then `revive` uses a built-in set of default linting rules.
|
||||
|
||||
### Docker
|
||||
A volume needs to be mounted to share the current repository with the container.
|
||||
Please refer to the [bind mounts Docker documentation](https://docs.docker.com/storage/bind-mounts/)
|
||||
|
||||
```bash
|
||||
docker run -v "$(pwd)":/var/<repository> ghcr.io/mgechev/revive:v1.1.2-next -config /var/<repository>/revive.toml -formatter stylish ./var/kidle/...
|
||||
```
|
||||
|
||||
- `-v` is for the volume
|
||||
- `ghcr.io/mgechev/revive:v1.1.2-next ` is the image name and its version corresponding to `revive` command
|
||||
- The provided flags are the same as the binary usage.
|
||||
|
||||
### Bazel
|
||||
|
||||
If you want to use revive with Bazel, take a look at the [rules](https://github.com/atlassian/bazel-tools/tree/master/gorevive) that Atlassian maintains.
|
||||
|
Reference in New Issue
Block a user