Skip to content

Commit 069c9d1

Browse files
authored
Add linting for markdown files (#465)
1 parent 603d18d commit 069c9d1

File tree

11 files changed

+410
-207
lines changed

11 files changed

+410
-207
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ A clear and concise description of what the bug is.
99

1010
**To reproduce**
1111
Steps to reproduce the behavior:
12+
1213
1. Deploy using 'some_command'
1314
2. View logs '....'
1415
3. See error
@@ -17,10 +18,11 @@ Steps to reproduce the behavior:
1718
A clear and concise description of what you expected to happen.
1819

1920
**Your environment**
20-
* Version of the Prometheus exporter - release version or a specific commit
21-
* Version of Docker/Kubernetes
22-
* [if applicable] Kubernetes platform (e.g. Mini-kube or GCP)
23-
* Using NGINX or NGINX Plus
21+
22+
- Version of the Prometheus exporter - release version or a specific commit
23+
- Version of Docker/Kubernetes
24+
- [if applicable] Kubernetes platform (e.g. Mini-kube or GCP)
25+
- Using NGINX or NGINX Plus
2426

2527
**Additional context**
2628
Add any other context about the problem here. Any log files you want to share.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
### Proposed changes
2-
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to that issue here in this description (not in the title of the PR).
2+
3+
Describe the use case and detail of the change. If this PR addresses an issue on GitHub, make sure to include a link to
4+
that issue here in this description (not in the title of the PR).
35

46
### Checklist
7+
58
Before creating a PR, run through this checklist and mark each as complete.
69

7-
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-prometheus-exporter/blob/main/CONTRIBUTING.md) guide
10+
- [ ] I have read the [CONTRIBUTING](https://github.com/nginxinc/nginx-prometheus-exporter/blob/main/CONTRIBUTING.md)
11+
guide
812
- [ ] I have proven my fix is effective or that my feature works
913
- [ ] I have checked that all unit tests pass after adding my changes
1014
- [ ] I have ensured the README is up to date

.markdownlint-cli2.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Rule configuration.
2+
# For rule descriptions and how to fix: https://github.com/DavidAnson/markdownlint/tree/main#rules--aliases
3+
config:
4+
ul-style:
5+
style: dash
6+
no-duplicate-heading:
7+
siblings_only: true
8+
line-length:
9+
line_length: 120
10+
code_blocks: false
11+
tables: false
12+
13+
# Define glob expressions to ignore
14+
ignores:
15+
- ".github/"
16+
17+
# Fix any fixable errors
18+
fix: true

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ repos:
2424
- id: no-commit-to-branch
2525
- id: requirements-txt-fixer
2626
- id: fix-byte-order-marker
27+
2728
- repo: local
2829
hooks:
2930
- id: golang-diff
@@ -32,15 +33,22 @@ repos:
3233
language: system
3334
types: [go]
3435
pass_filenames: false
36+
3537
- repo: https://github.com/golangci/golangci-lint
3638
rev: v1.53.3
3739
hooks:
3840
- id: golangci-lint
3941
args: [--new-from-patch=/tmp/diff.patch]
42+
4043
- repo: https://github.com/gitleaks/gitleaks
4144
rev: v8.17.0
4245
hooks:
4346
- id: gitleaks
4447

48+
- repo: https://github.com/DavidAnson/markdownlint-cli2
49+
rev: v0.8.1
50+
hooks:
51+
- id: markdownlint-cli2
52+
4553
ci:
4654
skip: [golang-diff, golangci-lint]

CHANGELOG.md

Lines changed: 122 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,156 +1,202 @@
11
# Changelog
22

3-
### 0.11.0
3+
## 0.11.0
44

55
A list of changes can be found on Github at: [Release v0.11.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.11.0)
66

7-
### 0.10.0
7+
## 0.10.0
88

99
A list of changes can be found on Github at: [Release v0.10.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.10.0)
1010

11-
### 0.9.0
11+
## 0.9.0
1212

1313
A list of changes can be found on Github at: [Release v0.9.0](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.9.0)
1414

15-
### 0.8.0
15+
## 0.8.0
1616

1717
CHANGES:
18-
* [103](https://github.com/nginxinc/nginx-prometheus-exporter/pull/103): Switch to `gcr.io/distroless/static` image. Use a non-root user to run the exporter process by default. Thanks to [Alex SZAKALY](https://github.com/alex1989hu).
19-
* Update Go version to 1.14
2018

21-
BUGFIXES:
22-
* [99](https://github.com/nginxinc/nginx-prometheus-exporter/pull/99): Fix link to metrics path. Thanks to [Yoan Blanc](https://github.com/greut).
23-
* [101](https://github.com/nginxinc/nginx-prometheus-exporter/pull/101): docs: fix dockerfile link. Thanks to [Eric Carboni](https://github.com/eric-hc).
19+
- [103](https://github.com/nginxinc/nginx-prometheus-exporter/pull/103): Switch to `gcr.io/distroless/static` image. Use
20+
a non-root user to run the exporter process by default. Thanks to [Alex SZAKALY](https://github.com/alex1989hu).
21+
- Update Go version to 1.14
22+
23+
FIXES:
24+
25+
- [99](https://github.com/nginxinc/nginx-prometheus-exporter/pull/99): Fix link to metrics path. Thanks to [Yoan Blanc](https://github.com/greut).
26+
- [101](https://github.com/nginxinc/nginx-prometheus-exporter/pull/101): docs: fix dockerfile link. Thanks to [Eric Carboni](https://github.com/eric-hc).
2427

2528
UPGRADE:
26-
* Use the 0.8.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.8.0`
27-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.8.0).
29+
30+
- Use the 0.8.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.8.0`
31+
- Download the latest binaries from [GitHub releases
32+
page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.8.0).
2833

2934
COMPATIBILITY:
30-
* NGINX 0.1.18 or newer.
31-
* NGINX Plus R19 or newer.
3235

33-
### 0.7.0
36+
- NGINX 0.1.18 or newer.
37+
- NGINX Plus R19 or newer.
38+
39+
## 0.7.0
3440

3541
FEATURES:
36-
* [86](https://github.com/nginxinc/nginx-prometheus-exporter/pull/86): Implemented TLS client certificate authentication. Thanks to [Fabian Lüpke](https://github.com/Fluepke).
3742

38-
BUGFIXES:
39-
* [96](https://github.com/nginxinc/nginx-prometheus-exporter/pull/96): Add const labels to upMetric. Thanks to [Robert Toth](https://github.com/robert-toth).
43+
- [86](https://github.com/nginxinc/nginx-prometheus-exporter/pull/86): Implemented TLS client certificate
44+
authentication. Thanks to [Fabian Lüpke](https://github.com/Fluepke).
45+
46+
FIXES:
47+
48+
- [96](https://github.com/nginxinc/nginx-prometheus-exporter/pull/96): Add const labels to upMetric. Thanks to [Robert
49+
Toth](https://github.com/robert-toth).
4050

4151
UPGRADE:
42-
* Use the 0.7.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.7.0`
43-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.7.0).
52+
53+
- Use the 0.7.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.7.0`
54+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.7.0).
4455

4556
COMPATIBILITY:
46-
* NGINX 0.1.18 or newer.
47-
* NGINX Plus R19 or newer.
4857

49-
### 0.6.0
58+
- NGINX 0.1.18 or newer.
59+
- NGINX Plus R19 or newer.
60+
61+
## 0.6.0
5062

5163
FEATURES:
52-
* [77](https://github.com/nginxinc/nginx-prometheus-exporter/pull/77): Add constLabels support via cli arg/env variable.
64+
65+
- [77](https://github.com/nginxinc/nginx-prometheus-exporter/pull/77): Add constLabels support via cli arg/env variable.
5366

5467
CHANGES:
55-
* Update alpine image.
68+
69+
- Update alpine image.
5670

5771
UPGRADE:
58-
* Use the 0.6.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.6.0`
59-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.6.0).
72+
73+
- Use the 0.6.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.6.0`
74+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.6.0).
6075

6176
COMPATIBILITY:
62-
* NGINX 0.1.18 or newer.
63-
* NGINX Plus R19 or newer.
6477

65-
### 0.5.0
78+
- NGINX 0.1.18 or newer.
79+
- NGINX Plus R19 or newer.
80+
81+
## 0.5.0
6682

6783
FEATURES:
68-
* [70](https://github.com/nginxinc/nginx-prometheus-exporter/pull/70): Set user agent on scrape requests to nginx.
69-
* [68](https://github.com/nginxinc/nginx-prometheus-exporter/pull/68): Add ability to scrape and listen on unix domain sockets.
70-
* [64](https://github.com/nginxinc/nginx-prometheus-exporter/pull/64): Add location zone and resolver metric support.
7184

72-
BUGFIXES:
73-
* [73](https://github.com/nginxinc/nginx-prometheus-exporter/pull/73): Fix typo in stream_zone_sync_status_nodes_online metric description.
74-
* [71](https://github.com/nginxinc/nginx-prometheus-exporter/pull/71): Do not assume default datasource in Grafana panels.
75-
* [62](https://github.com/nginxinc/nginx-prometheus-exporter/pull/62): Set correct nginx_up query and instance variable expression.
85+
- [70](https://github.com/nginxinc/nginx-prometheus-exporter/pull/70): Set user agent on scrape requests to nginx.
86+
- [68](https://github.com/nginxinc/nginx-prometheus-exporter/pull/68): Add ability to scrape and listen on unix domain
87+
sockets.
88+
- [64](https://github.com/nginxinc/nginx-prometheus-exporter/pull/64): Add location zone and resolver metric support.
89+
90+
FIXES:
91+
92+
- [73](https://github.com/nginxinc/nginx-prometheus-exporter/pull/73): Fix typo in stream_zone_sync_status_nodes_online
93+
metric description.
94+
- [71](https://github.com/nginxinc/nginx-prometheus-exporter/pull/71): Do not assume default datasource in Grafana
95+
panels.
96+
- [62](https://github.com/nginxinc/nginx-prometheus-exporter/pull/62): Set correct nginx_up query and instance variable
97+
expression.
7698

7799
UPGRADE:
78-
* Use the 0.5.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.5.0`
79-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.5.0).
100+
101+
- Use the 0.5.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.5.0`
102+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.5.0).
80103

81104
COMPATIBILITY:
82-
* NGINX 0.1.18 or newer.
83-
* NGINX Plus R19 or newer.
84105

85-
### 0.4.2
106+
- NGINX 0.1.18 or newer.
107+
- NGINX Plus R19 or newer.
108+
109+
## 0.4.2
86110

87-
BUGFIXES:
88-
* [60](https://github.com/nginxinc/nginx-prometheus-exporter/pull/60): *Fix session metrics for stream server zones*. Session metrics with a status of `4xx` or `5xx` are now correctly reported. Previously they were always reported as `0`.
111+
FIXES:
112+
113+
- [60](https://github.com/nginxinc/nginx-prometheus-exporter/pull/60): *Fix session metrics for stream server zones*.
114+
Session metrics with a status of `4xx` or `5xx` are now correctly reported. Previously they were always reported as
115+
`0`.
89116

90117
UPGRADE:
91-
* Use the 0.4.2 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.2`
92-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.2).
118+
119+
- Use the 0.4.2 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.2`
120+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.2).
93121

94122
COMPATIBILITY:
95-
* NGINX 0.1.18 or newer.
96-
* NGINX Plus R18 or newer.
97123

98-
### 0.4.1
124+
- NGINX 0.1.18 or newer.
125+
- NGINX Plus R18 or newer.
126+
127+
## 0.4.1
128+
129+
FIXES:
99130

100-
BUGFIXES:
101-
* [55](https://github.com/nginxinc/nginx-prometheus-exporter/pull/55): Do not export zone sync metrics if they are not reported by NGINX Plus. Previously, in such case, the metrics were exported with zero values.
131+
- [55](https://github.com/nginxinc/nginx-prometheus-exporter/pull/55): Do not export zone sync metrics if they are not
132+
reported by NGINX Plus. Previously, in such case, the metrics were exported with zero values.
102133

103134
UPGRADE:
104-
* Use the 0.4.1 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.1`
105-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.1).
135+
136+
- Use the 0.4.1 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.1`
137+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.1).
106138

107139
COMPATIBILITY:
108-
* NGINX 0.1.18 or newer.
109-
* NGINX Plus R18 or newer.
110140

111-
### 0.4.0
141+
- NGINX 0.1.18 or newer.
142+
- NGINX Plus R18 or newer.
143+
144+
## 0.4.0
112145

113146
FEATURES:
114-
* [50](https://github.com/nginxinc/nginx-prometheus-exporter/pull/50): Add zone sync metrics support.
115-
* [37](https://github.com/nginxinc/nginx-prometheus-exporter/pull/37): Implement a way to retry connection to NGINX if it is unreachable. Add -nginx.retries for setting the number of retries and -nginx.retry-interval for setting the interval between retries, both as cli-arguments.
147+
148+
- [50](https://github.com/nginxinc/nginx-prometheus-exporter/pull/50): Add zone sync metrics support.
149+
- [37](https://github.com/nginxinc/nginx-prometheus-exporter/pull/37): Implement a way to retry connection to NGINX if
150+
it is unreachable. Add -nginx.retries for setting the number of retries and -nginx.retry-interval for setting the
151+
interval between retries, both as cli-arguments.
116152

117153
UPGRADE:
118-
* Use the 0.4.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.0`
119-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.0).
154+
155+
- Use the 0.4.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.4.0`
156+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.4.0).
120157

121158
COMPATIBILITY:
122-
* NGINX 0.1.18 or newer.
123-
* NGINX Plus R18 or newer.
124159

125-
### 0.3.0
160+
- NGINX 0.1.18 or newer.
161+
- NGINX Plus R18 or newer.
162+
163+
## 0.3.0
126164

127165
FEATURES:
128-
* [32](https://github.com/nginxinc/nginx-prometheus-exporter/pull/32): Add nginxexporter_build_info metric.
129-
* [31](https://github.com/nginxinc/nginx-prometheus-exporter/pull/31): Implement nginx_up and nginxplus_up metrics. Add -nginx.timeout cli argument for setting a timeout for scrapping metrics from NGINX or NGINX Plus.
166+
167+
- [32](https://github.com/nginxinc/nginx-prometheus-exporter/pull/32): Add nginxexporter_build_info metric.
168+
- [31](https://github.com/nginxinc/nginx-prometheus-exporter/pull/31): Implement nginx_up and nginxplus_up metrics. Add
169+
-nginx.timeout cli argument for setting a timeout for scrapping metrics from NGINX or NGINX Plus.
130170

131171
UPGRADE:
132-
* Use the 0.3.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.3.0`
133-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.3.0).
172+
173+
- Use the 0.3.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.3.0`
174+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.3.0).
134175

135176
COMPATIBILITY:
136-
* NGINX 0.1.18 or newer.
137-
* NGINX Plus R14 or newer.
177+
178+
- NGINX 0.1.18 or newer.
179+
- NGINX Plus R14 or newer.
138180

139181
## 0.2.0
140182

141183
FEATURES:
142-
* [16](https://github.com/nginxinc/nginx-prometheus-exporter/pull/16): Add stream metrics support.
143-
* [13](https://github.com/nginxinc/nginx-prometheus-exporter/pull/13): Add a flag for controlling SSL verification of NGINX stub_status/API endpoint. Thanks to [Raza Jhaveri](https://github.com/razaj92).
144-
* [3](https://github.com/nginxinc/nginx-prometheus-exporter/pull/3): Support for environment variables.
184+
185+
- [16](https://github.com/nginxinc/nginx-prometheus-exporter/pull/16): Add stream metrics support.
186+
- [13](https://github.com/nginxinc/nginx-prometheus-exporter/pull/13): Add a flag for controlling SSL verification of
187+
NGINX stub_status/API endpoint. Thanks to [Raza Jhaveri](https://github.com/razaj92).
188+
- [3](https://github.com/nginxinc/nginx-prometheus-exporter/pull/3): Support for environment variables.
145189

146190
UPGRADE:
147-
* Use the 0.2.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.2.0`
148-
* Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.2.0).
191+
192+
- Use the 0.2.0 image from our DockerHub: `nginx/nginx-prometheus-exporter:0.2.0`
193+
- Download the latest binaries from [GitHub releases page](https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.2.0).
149194

150195
COMPATIBILITY:
151-
* NGINX 0.1.18 or newer.
152-
* NGINX Plus R14 or newer.
196+
197+
- NGINX 0.1.18 or newer.
198+
- NGINX Plus R14 or newer.
153199

154200
## 0.1.0
155201

156-
* Initial release.
202+
- Initial release.

0 commit comments

Comments
 (0)