From d9a6eb8dd932bbff91029dfa7477ddd4434bb4e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Neum=C3=BCller?= Date: Thu, 15 Jul 2021 01:52:44 +0200 Subject: [PATCH] Add markdownlint. (#52) * Add markdownlint. * sudo * Update .markdownlint.yaml Co-authored-by: Armin Ruech Co-authored-by: Armin Ruech --- .github/workflows/markdown.yml | 24 +++++++++++++++++++ .markdownlint.yaml | 16 +++++++++++++ protobuf/README.md | 2 +- .../data/markdown/missing_end_tag/input.md | 5 ++-- .../data/markdown/multiple_enum/expected.md | 2 -- .../data/markdown/multiple_enum/input.md | 2 -- .../data/markdown/parameter_full/http.md | 2 +- .../data/markdown/parameter_tag/input.md | 1 - .../markdown/parameter_tag_empty/input.md | 1 - .../markdown/parameter_tag_no_attr/input.md | 1 - .../data/markdown/wrong_semconv_id/input.md | 5 ++-- 11 files changed, 46 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/markdown.yml create mode 100644 .markdownlint.yaml diff --git a/.github/workflows/markdown.yml b/.github/workflows/markdown.yml new file mode 100644 index 00000000..ef13e6b7 --- /dev/null +++ b/.github/workflows/markdown.yml @@ -0,0 +1,24 @@ +name: Markdown checks + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + paths: + - .github/workflows/markdownlint.yml + - .markdownlint.yaml + - '**.md' + +jobs: + markdownlint: + runs-on: ubuntu-latest + steps: + - name: check out code + uses: actions/checkout@v2 + + - name: install markdownlint + run: sudo npm install -g markdownlint-cli + + - name: run markdownlint + run: markdownlint '**.md' --ignore 'node_modules/**' diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 00000000..35c296d0 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,16 @@ +# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md +# and https://github.com/DavidAnson/markdownlint/blob/main/README.md + +# This should be kept in sync with https://github.com/open-telemetry/opentelemetry-specification/blob/main/.markdownlint.yaml + +# Default state for all rules +default: true + +ul-style: false +line-length: false +no-duplicate-header: + siblings_only: true +ol-prefix: + style: ordered +no-inline-html: false +fenced-code-language: false diff --git a/protobuf/README.md b/protobuf/README.md index abd779ac..4a567e4f 100644 --- a/protobuf/README.md +++ b/protobuf/README.md @@ -3,7 +3,7 @@ A lightweight protoc Docker image, published as otel/build-protobuf to Docker Hub, with all dependencies built-in, to generate code in multiple languages. -Forked from https://github.com/jaegertracing/docker-protobuf. +Forked from . ## What's included in the image diff --git a/semantic-conventions/src/tests/data/markdown/missing_end_tag/input.md b/semantic-conventions/src/tests/data/markdown/missing_end_tag/input.md index cbd1f8bd..9aa978a7 100644 --- a/semantic-conventions/src/tests/data/markdown/missing_end_tag/input.md +++ b/semantic-conventions/src/tests/data/markdown/missing_end_tag/input.md @@ -1,4 +1,4 @@ -## Common Attributes +# Common Attributes @@ -15,10 +15,9 @@ | `http.flavor` | Kind of HTTP protocol used: `"1.0"`, `"1.1"`, `"2"`, `"SPDY"` or `"QUIC"`. | No | | `http.user_agent` | Value of the HTTP [User-Agent][] header sent by the client. | No | - It is recommended to also use the general [network attributes][], especially `net.peer.ip`. If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. [network attributes]: span-general.md#general-network-connection-attributes [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 [HTTP reason phrase]: https://tools.ietf.org/html/rfc7230#section-3.1.2 -[User-Agent]: https://tools.ietf.org/html/rfc7231#section-5.5.3 \ No newline at end of file +[User-Agent]: https://tools.ietf.org/html/rfc7231#section-5.5.3 diff --git a/semantic-conventions/src/tests/data/markdown/multiple_enum/expected.md b/semantic-conventions/src/tests/data/markdown/multiple_enum/expected.md index 7ccb2827..9e0c6e86 100644 --- a/semantic-conventions/src/tests/data/markdown/multiple_enum/expected.md +++ b/semantic-conventions/src/tests/data/markdown/multiple_enum/expected.md @@ -56,5 +56,3 @@ | `5G` | 5G | - - diff --git a/semantic-conventions/src/tests/data/markdown/multiple_enum/input.md b/semantic-conventions/src/tests/data/markdown/multiple_enum/input.md index 649cd160..a14e1924 100644 --- a/semantic-conventions/src/tests/data/markdown/multiple_enum/input.md +++ b/semantic-conventions/src/tests/data/markdown/multiple_enum/input.md @@ -3,5 +3,3 @@ - - diff --git a/semantic-conventions/src/tests/data/markdown/parameter_full/http.md b/semantic-conventions/src/tests/data/markdown/parameter_full/http.md index bb0ad79d..3d4f2a49 100644 --- a/semantic-conventions/src/tests/data/markdown/parameter_full/http.md +++ b/semantic-conventions/src/tests/data/markdown/parameter_full/http.md @@ -20,4 +20,4 @@ At least one of the following is required: * `http.scheme`, `http.server_name`, [net.host.port](general.md), `http.target` * `http.scheme`, [net.host.name](general.md), [net.host.port](general.md), `http.target` - \ No newline at end of file + diff --git a/semantic-conventions/src/tests/data/markdown/parameter_tag/input.md b/semantic-conventions/src/tests/data/markdown/parameter_tag/input.md index b42ce780..8d8eea28 100644 --- a/semantic-conventions/src/tests/data/markdown/parameter_tag/input.md +++ b/semantic-conventions/src/tests/data/markdown/parameter_tag/input.md @@ -2,5 +2,4 @@ - \ No newline at end of file diff --git a/semantic-conventions/src/tests/data/markdown/parameter_tag_empty/input.md b/semantic-conventions/src/tests/data/markdown/parameter_tag_empty/input.md index fe27e1f6..2d34ad3c 100644 --- a/semantic-conventions/src/tests/data/markdown/parameter_tag_empty/input.md +++ b/semantic-conventions/src/tests/data/markdown/parameter_tag_empty/input.md @@ -2,5 +2,4 @@ - \ No newline at end of file diff --git a/semantic-conventions/src/tests/data/markdown/parameter_tag_no_attr/input.md b/semantic-conventions/src/tests/data/markdown/parameter_tag_no_attr/input.md index ae84118b..f68b43cb 100644 --- a/semantic-conventions/src/tests/data/markdown/parameter_tag_no_attr/input.md +++ b/semantic-conventions/src/tests/data/markdown/parameter_tag_no_attr/input.md @@ -2,5 +2,4 @@ - \ No newline at end of file diff --git a/semantic-conventions/src/tests/data/markdown/wrong_semconv_id/input.md b/semantic-conventions/src/tests/data/markdown/wrong_semconv_id/input.md index 112af885..4f874868 100644 --- a/semantic-conventions/src/tests/data/markdown/wrong_semconv_id/input.md +++ b/semantic-conventions/src/tests/data/markdown/wrong_semconv_id/input.md @@ -1,4 +1,4 @@ -## Common Attributes +# Common Attributes @@ -15,10 +15,9 @@ | `http.flavor` | Kind of HTTP protocol used: `"1.0"`, `"1.1"`, `"2"`, `"SPDY"` or `"QUIC"`. | No | | `http.user_agent` | Value of the HTTP [User-Agent][] header sent by the client. | No | - It is recommended to also use the general [network attributes][], especially `net.peer.ip`. If `net.transport` is not specified, it can be assumed to be `IP.TCP` except if `http.flavor` is `QUIC`, in which case `IP.UDP` is assumed. [network attributes]: span-general.md#general-network-connection-attributes [HTTP response status code]: https://tools.ietf.org/html/rfc7231#section-6 [HTTP reason phrase]: https://tools.ietf.org/html/rfc7230#section-3.1.2 -[User-Agent]: https://tools.ietf.org/html/rfc7231#section-5.5.3 \ No newline at end of file +[User-Agent]: https://tools.ietf.org/html/rfc7231#section-5.5.3