Skip to content

Commit

Permalink
dev: Use markdownlint-cli2 (linkerd#8612)
Browse files Browse the repository at this point in the history
VSCode extensions tend to use `markdownlint-cli2`. This change replaces
our uses of `markdownlint-cli` with `markdownlint-cli2`. We update CI to
use `DavidAnson/markdownlint-cli2-action` and we remove the
`bin/markdown*` scripts.

The devcontainer is updated to v16 including the appropriate set of
tools.

Signed-off-by: Oliver Gould <[email protected]>
  • Loading branch information
olix0r authored Jun 7, 2022
1 parent 4fa4482 commit 3a94aa9
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 59 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ RUN apt update && \
time \
unzip && \
rm -rf /var/lib/apt/lists/*
RUN npm install markdownlint-cli@0.23.1 --global
RUN npm install markdownlint-cli2@0.4.0 --global

RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen

Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "linkerd2",
"image": "ghcr.io/linkerd/dev:v15",
"image": "ghcr.io/linkerd/dev:v16",
// "dockerFile": "./Dockerfile",
// "context": "..",
"extensions": [
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: markdown

permissions:
contents: read

on:
pull_request:
paths:
- '**/*.md'
- .github/workflows/markdown.yml

jobs:
markdownlint:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- uses: DavidAnson/markdownlint-cli2-action@744f913a124058ee903768d3adb92a4847e5d132
with:
globs: |
**/*.md
!**/node_modules/**
!target/**
10 changes: 0 additions & 10 deletions .github/workflows/static_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,6 @@ jobs:
rootPath: bin/win/tools
failOnInfos: true

markdown_lint:
name: Markdown lint
timeout-minutes: 10
runs-on: ubuntu-20.04
steps:
- name: Checkout code
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b
- name: Markdown lint
run: bin/markdownlint-all

chart_docs_diff:
name: Chart readme diff check
runs-on: ubuntu-20.04
Expand Down
6 changes: 3 additions & 3 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ transparent to the application, and work with any network topology.
attempts to prevent the most common traffic-loop scenarios to protect against
this.

***NOTE***: Linkerd's `multicluster` extension does not yet work on Amazon
_**NOTE**_: Linkerd's `multicluster` extension does not yet work on Amazon
EKS. We expect to follow this release with a stable-2.8.1 to address this
issue. Follow [#4582](https://github.com/linkerd/linkerd2/pull/4582) for updates.

Expand Down Expand Up @@ -5508,8 +5508,8 @@ to reduce possible naming collisions. To upgrade an existing installation:
For more information, see the [Upgrade Guide](https://linkerd.io/2/upgrade/).

* CLI
* **Improved** `linkerd routes` command displays per-route stats for *any
resource*!
* **Improved** `linkerd routes` command displays per-route stats for _any
resource_!
* **New** Service profiles are now supported for external authorities!
* **New** `linkerd routes --open-api` flag generates a service profile based
on an OpenAPI specification (swagger) file
Expand Down
20 changes: 0 additions & 20 deletions bin/markdownlint

This file was deleted.

8 changes: 0 additions & 8 deletions bin/markdownlint-all

This file was deleted.

37 changes: 21 additions & 16 deletions test/fuzzing/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
# Fuzzing Linkerd

The scripting setup for fuzzing is used by
[google/oss-fuzz](https://github.com/google/oss-fuzz) which performs continuous
fuzzing for the Linkerd project.
The scripting setup for fuzzing is used by [google/oss-fuzz] which
performs continuous fuzzing for the Linkerd project.

The fuzzing configuration for Linkerd is located in the
[linkerd2](https://github.com/google/oss-fuzz/tree/master/projects/linkerd2)
project which handles the docker build and execution of the fuzzers.
The fuzzing configuration for Linkerd is located in the [linkerd2
project directory][of-l2] which handles the docker build and execution of the
fuzzers.

## Running locally

Instructions for running the fuzzers locally can be found in the oss-fuzz
[docs](https://google.github.io/oss-fuzz/getting-started/new-project-guide/#testing-locally).
[docs].

This will require cloning the [oss-fuzz](https://github.com/google/oss-fuzz)
repository locally and running the commands outlined in the instructions.
This will require cloning the [google/oss-fuzz] repository locally and running
the commands outlined in the instructions.

### oss-fuzz File Setup

- [Dockerfile](https://github.com/google/oss-fuzz/blob/master/projects/linkerd2/Dockerfile)
provides the necessary environment for running the fuzzer; the main thing
being the `oss-fuzz-base` image which provides the `compile_go_fuzzer`
funtions seen in this directory's `build.sh`.
- [build.sh](https://github.com/google/oss-fuzz/blob/master/projects/linkerd2/build.sh)
is responsible for calling the fuzzing functions for each fuzzer in the
linkerd2 project.
- [Dockerfile] provides the necessary environment for running the
fuzzer; the main thing being the `oss-fuzz-base` image which provides the
`compile_go_fuzzer` funtions seen in this directory's `build.sh`.
- [build.sh] is responsible for calling the fuzzing functions for each
fuzzer in the linkerd2 project.

<!-- refs -->
[google/oss-fuzz]: https://github.com/google/oss-fuzz
[of-l2]: https://github.com/google/oss-fuzz/tree/master/projects/linkerd2
[docs]: https://google.github.io/oss-fuzz/getting-started/new-project-guide/#testing-locally
[Dockerfile]: https://github.com/google/oss-fuzz/blob/master/projects/linkerd2/Dockerfile
[build.sh]: https://github.com/google/oss-fuzz/blob/master/projects/linkerd2/build.sh

0 comments on commit 3a94aa9

Please sign in to comment.