1
0
mirror of https://github.com/regclient/regclient.git synced 2025-04-18 22:44:00 +03:00

Add markdown linting

Signed-off-by: Brandon Mitchell <git@bmitch.net>
This commit is contained in:
Brandon Mitchell 2022-03-05 09:32:02 -05:00
parent 2ce8ef5e60
commit 33440ff9eb
4 changed files with 41 additions and 15 deletions

19
.markdownlint.yml Normal file
View File

@ -0,0 +1,19 @@
# all lists use a `-`
MD004:
style: dash
# allow tabs in code blocks (for Go)
MD010:
code_blocks: false
# disable line length, prefer one sentence per line for PRs
MD013: false
# emphasis with underscore (`_emphasis_`)
MD049:
style: "underscore"
# bold with asterisk (`**bold**`)
MD050:
style: "asterisk"

View File

@ -18,23 +18,23 @@ diverse, inclusive, and healthy community.
Examples of behavior that contributes to a positive environment for our Examples of behavior that contributes to a positive environment for our
community include: community include:
* Demonstrating empathy and kindness toward other people - Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences - Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback - Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, - Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall - Focusing on what is best not just for us as individuals, but for the overall
community community
Examples of unacceptable behavior include: Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or advances of - The use of sexualized language or imagery, and sexual attention or advances of
any kind any kind
* Trolling, insulting or derogatory comments, and personal or political attacks - Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment - Public or private harassment
* Publishing others' private information, such as a physical or email address, - Publishing others' private information, such as a physical or email address,
without their explicit permission without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a - Other conduct which could reasonably be considered inappropriate in a
professional setting professional setting
## Enforcement Responsibilities ## Enforcement Responsibilities

View File

@ -14,8 +14,9 @@ GO_BUILD_FLAGS=-ldflags "$(LD_FLAGS)" -tags nolegacy
DOCKERFILE_EXT:=$(shell if docker build --help 2>/dev/null | grep -q -- '--progress'; then echo ".buildkit"; fi) DOCKERFILE_EXT:=$(shell if docker build --help 2>/dev/null | grep -q -- '--progress'; then echo ".buildkit"; fi)
DOCKER_ARGS=--build-arg "VCS_REF=$(VCS_REF)" DOCKER_ARGS=--build-arg "VCS_REF=$(VCS_REF)"
GOPATH:=$(shell go env GOPATH) GOPATH:=$(shell go env GOPATH)
PWD:=$(shell pwd)
.PHONY: all fmt vet test vendor binaries docker artifacts artifact-pre plugin-user plugin-host .FORCE .PHONY: all fmt vet test lint lint-go lint-md vendor binaries docker artifacts artifact-pre plugin-user plugin-host .FORCE
.FORCE: .FORCE:
@ -30,9 +31,15 @@ vet:
test: test:
go test -cover ./... go test -cover ./...
lint: $(GOPATH)/bin/staticcheck lint: lint-go lint-md
lint-go: $(GOPATH)/bin/staticcheck .FORCE
$(GOPATH)/bin/staticcheck -checks all ./... $(GOPATH)/bin/staticcheck -checks all ./...
lint-md: .FORCE
docker run --rm -v "$(PWD):/workdir:ro" ghcr.io/igorshubovych/markdownlint-cli:latest \
--ignore vendor .
vendor: vendor:
go mod vendor go mod vendor

View File

@ -88,7 +88,7 @@ The following functions have been added in addition to the defaults available in
Experimentally, the API call has been added to take a token and run the tag delete against `hub.docker.com` instead of `docker.io`. Experimentally, the API call has been added to take a token and run the tag delete against `hub.docker.com` instead of `docker.io`.
To implement this, add the following section to the `~/.regctl/config.json`: To implement this, add the following section to the `~/.regctl/config.json`:
```json ```jsonc
{ {
"hosts": { "hosts": {
"hub.docker.com": { "hub.docker.com": {
@ -108,11 +108,11 @@ The following functions have been added in addition to the defaults available in
A: If your `$HOME/.docker/config.json` includes a section like the following: A: If your `$HOME/.docker/config.json` includes a section like the following:
```json ```jsonc
"credHelpers": { "credHelpers": {
"gcr.io": "gcr", "gcr.io": "gcr",
"public.ecr.aws": "ecr-login", "public.ecr.aws": "ecr-login",
}, }
``` ```
These will work with standalone binaries or with the alpine image variants. These will work with standalone binaries or with the alpine image variants.