mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-23 03:49:49 -08:00
docs: add linter (#4945)
Some checks are pending
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
Some checks are pending
code_lint / go (push) Waiting to run
code_lint / go_mod (push) Waiting to run
code_lint / docs (push) Waiting to run
code_lint / api_docs (push) Waiting to run
code_test / test_64 (push) Waiting to run
code_test / test_32 (push) Waiting to run
code_test / test_e2e (push) Waiting to run
This commit is contained in:
parent
5f61395915
commit
3a4d4e1802
4 changed files with 48 additions and 28 deletions
|
|
@ -1,21 +1,33 @@
|
|||
define DOCKERFILE_APIDOCS_LINT
|
||||
define DOCKERFILE_DOCS_LINT
|
||||
FROM $(NODE_IMAGE)
|
||||
RUN yarn global add prettier@3.6.2
|
||||
endef
|
||||
export DOCKERFILE_DOCS_LINT
|
||||
|
||||
define DOCKERFILE_API_DOCS_LINT
|
||||
FROM $(NODE_IMAGE)
|
||||
RUN yarn global add @redocly/cli@1.0.0-beta.123
|
||||
endef
|
||||
export DOCKERFILE_APIDOCS_LINT
|
||||
export DOCKERFILE_API_DOCS_LINT
|
||||
|
||||
lint-golangci:
|
||||
lint-go:
|
||||
docker run --rm -v "$(shell pwd):/app" -w /app \
|
||||
$(LINT_IMAGE) \
|
||||
$(GOLANGCI_LINT_IMAGE) \
|
||||
golangci-lint run -v
|
||||
|
||||
lint-mod-tidy:
|
||||
lint-go-mod:
|
||||
go mod tidy
|
||||
git diff --exit-code
|
||||
|
||||
lint-apidocs:
|
||||
echo "$$DOCKERFILE_APIDOCS_LINT" | docker build . -f - -t temp
|
||||
lint-docs:
|
||||
echo "$$DOCKERFILE_DOCS_LINT" | docker build . -f - -t temp
|
||||
docker run --rm -v "$(shell pwd)/docs:/s" -w /s temp \
|
||||
sh -c "prettier --write ."
|
||||
git diff --exit-code
|
||||
|
||||
lint-api-docs:
|
||||
echo "$$DOCKERFILE_API_DOCS_LINT" | docker build . -f - -t temp
|
||||
docker run --rm -v "$(shell pwd)/api:/s" -w /s temp \
|
||||
sh -c "openapi lint openapi.yaml"
|
||||
|
||||
lint: lint-golangci lint-mod-tidy lint-apidocs
|
||||
lint: lint-go lint-go-mod lint-docs lint-api-docs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue