Initial draft of plugin.
All checks were successful
All checks were successful
This commit is contained in:
parent
c5391b5a98
commit
da82c0f30a
16 changed files with 755 additions and 0 deletions
73
README.md
Normal file
73
README.md
Normal file
|
@ -0,0 +1,73 @@
|
|||
# Markdownlint WoodpeckerCI Plugin
|
||||
|
||||
[](https://hub.docker.com/r/kokuwaio/dockerhub-metadata)
|
||||
[](https://hub.docker.com/r/kokuwaio/markdownlint)
|
||||
[](https://git.kokuwa.io/woodpecker/markdownlint/src/branch/main/Dockerfile)
|
||||
[](https://git.kokuwa.io/woodpecker/markdownlint/src/branch/main/LICENSE)
|
||||
[](https://git.kokuwa.io/woodpecker/markdownlint/pulls)
|
||||
[](https://git.kokuwa.io/woodpecker/markdownlint/issues)
|
||||
|
||||
A [Woodpecker CI](https://woodpecker-ci.org) plugin for [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli) to lint markdown files.
|
||||
Also usable with Gitlab, Github or locally, see examples for usage.
|
||||
|
||||
## Features
|
||||
|
||||
- preconfigure markdownlint-cli parameters
|
||||
- searches for markdown files recursive
|
||||
- runnable with local docker daemon
|
||||
|
||||
## Example
|
||||
|
||||
Woodpecker:
|
||||
|
||||
```yaml
|
||||
steps:
|
||||
markdownlint:
|
||||
image: kokuwaio/markdownlint
|
||||
settings:
|
||||
dot: true
|
||||
enable: [MD013, MD041]
|
||||
when:
|
||||
event: pull_request
|
||||
path: [.markdownlint.yaml, "**/*.md"]]
|
||||
```
|
||||
|
||||
Gitlab:
|
||||
|
||||
```yaml
|
||||
markdownlint:
|
||||
stage: lint
|
||||
image: kokuwaio/markdownlint
|
||||
variables:
|
||||
PLUGIN_DOT: true
|
||||
PLUGIN_ENABLE: MD013,MD041
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes: [.markdownlint.yaml, "**/*.md"]
|
||||
```
|
||||
|
||||
CLI:
|
||||
|
||||
```bash
|
||||
docker run --rm --volume=$(pwd):$(pwd):rw --workdir=$(pwd) kokuwaio/markdownlint --fix
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
| Settings Name | Environment | Default | Description |
|
||||
| --------------| ------------------ | ------- | -------------------------------------------------------- |
|
||||
| `config-file` | PLUGIN_CONFIG_FILE | `none` | Configuration file (JSON, JSONC, JS, YAML, or TOML) |
|
||||
| `dot` | PLUGIN_DOT | `true` | Include files/folders with a dot (for example `.github`) |
|
||||
| `enable` | PLUGIN_ENABLE | `none` | Enable certain rules, e.g. --enable=MD013,MD041 |
|
||||
| `disable` | PLUGIN_DISABLE | `none` | Disable certain rules, e.g. --disable=MD013,MD041 |
|
||||
|
||||
## Alternatives
|
||||
|
||||
| Image | Comment | amd64 | arm64 |
|
||||
| ---------------------------------------------------------------------------------------- | --------------------------------- |:-----:|:-----:|
|
||||
| [kokuwaio/markdownlint](https://hub.docker.com/r/kokuwaio/markdownlint) | Woodpecker plugin | [](https://hub.docker.com/r/kokuwaio/markdownlint) | [](https://hub.docker.com/r/kokuwaio/markdownlint) |
|
||||
| [ghcr.io/igorshubovych/markdownlint-cli](https://ghcr.io/igorshubovych/markdownlint-cli) | not a Woodpecker plugin, official | [](https://hub.docker.com/r/ghcr.io/igorshubovych/markdownlint-cli) | [](https://hub.docker.com/r/ghcr.io/igorshubovych/markdownlint-cli) |
|
||||
| [tmknom/markdownlint](https://hub.docker.com/r/tmknom/markdownlint) | not a Woodpecker plugin | [](https://hub.docker.com/r/tmknom/markdownlint) | [](https://hub.docker.com/r/tmknom/markdownlint) |
|
||||
| [thegeeklab/markdownlint-cli](https://hub.docker.com/r/thegeeklab/markdownlint-cli) | not a Woodpecker plugin | [](https://hub.docker.com/r/thegeeklab/markdownlint-cli) | [](https://hub.docker.com/r/thegeeklab/markdownlint-cli) |
|
||||
| [peterdavehello/markdownlint](https://hub.docker.com/r/peterdavehello/markdownlint) | not a Woodpecker plugin | [](https://hub.docker.com/r/peterdavehello/markdownlint) | [](https://hub.docker.com/r/peterdavehello/markdownlint) |
|
||||
| [06kellyjac/markdownlint-cli](https://hub.docker.com/r/06kellyjac/markdownlint-cli) | not a Woodpecker plugin, outdated | [](https://hub.docker.com/r/06kellyjac/markdownlint-cli) | [](https://hub.docker.com/r/06kellyjac/markdownlint-cli) |
|
Loading…
Add table
Add a link
Reference in a new issue