Skip to content

Fix Markdown checks #673

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/build-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,6 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: install dependencies
run: npm install

- name: run markdown-link-check
run: make markdown-link-check

Expand All @@ -141,8 +138,5 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: install dependencies
run: npm install

- name: run markdownlint
run: make markdownlint
4 changes: 3 additions & 1 deletion .markdownlint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,6 @@ no-duplicate-header:
ol-prefix:
style: ordered
no-inline-html: false
fenced-code-language: false
fenced-code-language: false
MD024: false
MD059: false
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ all: gen-all markdown-link-check markdownlint
.PHONY: gen-all
gen-all: gen-cpp gen-csharp gen-go gen-java gen-kotlin gen-objc gen-openapi gen-php gen-python gen-ruby

DEPENDENCIES_DOCKERFILE=./dependencies.Dockerfile

OTEL_DOCKER_PROTOBUF ?= otel/build-protobuf:0.9.0
BUF_DOCKER ?= bufbuild/buf:1.7.0

Expand Down Expand Up @@ -168,21 +170,24 @@ breaking-change:

ALL_DOCS := $(shell find . -type f -name '*.md' -not -path './.github/*' -not -path './node_modules/*' | sort)

LYCHEEIMAGE := $(shell awk '$$4=="lychee" {print $$2}' $(DEPENDENCIES_DOCKERFILE))
.PHONY: markdown-link-check
markdown-link-check:
docker run --rm \
--mount 'type=bind,source=$(PWD),target=/home/repo' \
lycheeverse/lychee \
$(LYCHEEIMAGE) \
--config home/repo/.lychee.toml \
--root-dir /home/repo \
-v \
home/repo

MARKDOWNLINTIMAGE := $(shell awk '$$4=="markdownlint" {print $$2}' $(DEPENDENCIES_DOCKERFILE))
.PHONY: markdownlint
markdownlint:
@if ! npm ls markdownlint; then npm install; fi
@for f in $(ALL_DOCS); do \
echo $$f; \
npx --no -p markdownlint-cli markdownlint -c .markdownlint.yaml $$f \
|| exit 1; \
docker run --rm \
--mount 'type=bind,source=$(PWD),target=/workdir' \
$(MARKDOWNLINTIMAGE) \
--config .markdownlint.yaml $$f || exit 1; \
done
3 changes: 3 additions & 0 deletions dependencies.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This is a renovate-friendly source of Docker images.
FROM davidanson/markdownlint-cli2:v0.18.1@sha256:173cb697a255a8a985f2c6a83b4f7a8b3c98f4fb382c71c45f1c52e4d4fed63a AS markdownlint
FROM lycheeverse/lychee:sha-3a09227-alpine@sha256:5853bd7c283663a1200dbb15924a5047f8d4c50adfa7a4c212a94f04bbac831c AS lychee
1 change: 1 addition & 0 deletions docs/specification.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- markdownlint-disable-next-line first-line-heading -->
<!--- Hugo front matter used to generate the website version of this page:
title: OTLP Specification
linkTitle: OTLP
Expand Down
Loading