Skip to content

Commit d3e2656

Browse files
Update linting workflows
- Remove deprecated misspell script. - Consolidate linting into one workflow. - Fix some markdownlint warnings. - Add GitHub Actions linter. - Pin markdown-link-check version.
1 parent 955aa17 commit d3e2656

File tree

6 files changed

+71
-86
lines changed

6 files changed

+71
-86
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
Fixes #
2-
3-
## Changes
1+
# Changes
42

53
Please provide a brief description of the changes here.
64

75
## Merge requirement checklist
86

97
* [ ] Unit tests added/updated
10-
* [ ] [`CHANGELOG.md`](https://github.com/grafana/grafana-opentelemetry-dotnet) file updated for non-trivial changes
8+
* [ ] [`CHANGELOG.md`](https://github.com/grafana/grafana-opentelemetry-dotnet) updated
119
* [ ] Changes in public API reviewed (if applicable)

.github/actionlint-matcher.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"problemMatcher": [
3+
{
4+
"owner": "actionlint",
5+
"pattern": [
6+
{
7+
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*:(?:\\x1b\\[\\d+m)*(\\d+)(?:\\x1b\\[\\d+m)*: (?:\\x1b\\[\\d+m)*(.+?)(?:\\x1b\\[\\d+m)* \\[(.+?)\\]$",
8+
"file": 1,
9+
"line": 2,
10+
"column": 3,
11+
"message": 4,
12+
"code": 5
13+
}
14+
]
15+
}
16+
]
17+
}

.github/workflows/lint.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: lint
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions: {}
9+
10+
env:
11+
FORCE_COLOR: 3
12+
TERM: xterm
13+
14+
jobs:
15+
lint:
16+
runs-on: ubuntu-latest
17+
18+
permissions:
19+
contents: read
20+
21+
steps:
22+
23+
- name: Checkout code
24+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
with:
26+
filter: 'tree:0'
27+
persist-credentials: false
28+
show-progress: false
29+
30+
- name: Add actionlint problem matcher
31+
run: echo "::add-matcher::.github/actionlint-matcher.json"
32+
33+
- name: Lint workflows
34+
uses: docker://rhysd/actionlint:1.7.7@sha256:887a259a5a534f3c4f36cb02dca341673c6089431057242cdc931e9f133147e9
35+
with:
36+
args: -color
37+
38+
- name: Lint markdown
39+
uses: DavidAnson/markdownlint-cli2-action@992badcdf24e3b8eb7e87ff9287fe931bcb00c6e # v20.0.0
40+
with:
41+
config: '.markdownlint.yaml'
42+
globs: |
43+
**/*.md
44+
45+
- name: Install markdown-link-check
46+
env:
47+
# renovate: datasource=npm depName=markdown-link-check packageName=markdown-link-check
48+
MARKDOWN_LINK_CHECK_VERSION: 3.13.7
49+
run: sudo npm install -g "markdown-link-check@${MARKDOWN_LINK_CHECK_VERSION}"
50+
51+
- name: Check markdown links
52+
run: "find . -name '*.md' -print0 | xargs -0 -n1 markdown-link-check --config .markdown_link_check_config.json"

.github/workflows/markdown-link-check.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/markdownlint.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

.github/workflows/misspell.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)