Skip to content

Commit 87db322

Browse files
committed
lint
Signed-off-by: Gregor Zeitlinger <[email protected]>
1 parent 53b20e6 commit 87db322

File tree

20 files changed

+98
-66
lines changed

20 files changed

+98
-66
lines changed

.editorconfig

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
root = true
22

3+
[*]
4+
max_line_length = 100
5+
indent_size = 2
6+
37
[version-rules.xml]
48
max_line_length = 200
59

@@ -10,9 +14,6 @@ max_line_length = 200
1014
[pom.xml]
1115
indent_size = 4
1216

13-
[docs/themes/**.*]
14-
max_line_length = 400
15-
16-
[*]
17-
max_line_length = 150
18-
indent_size = 2
17+
[*.py]
18+
# checked by black
19+
indent_size = 4

.github/super-linter.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ VALIDATE_JAVA=false
1818
VALIDATE_JAVASCRIPT_STANDARD=false
1919
# we have many duplicate code in our codebase for demo purposes
2020
VALIDATE_JSCPD=false
21+
VALIDATE_PYTHON_BLACK=false
2122
VALIDATE_PYTHON_PYLINT=false
2223

2324
FIX_ENV=true

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
env:
1818
GPG_SIGNING_KEY: ${{ secrets.GPG_SIGNING_KEY }}
1919
run: |
20-
echo "${#GPG_SIGNING_KEY}" | wc -c
20+
echo "${#GPG_SIGNING_KEY}"
2121
echo "${GPG_SIGNING_KEY}" | gpg --batch --import-options import-show --import
2222
- name: Checkout Plugin Repository
2323
uses: actions/checkout@v4

MAINTAINERS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Maintainers
2+
13
- Fabian Stäber <[email protected]> @fstab
24
- Doug Hoard <[email protected]> @dhoard
35
- Tom Wilkie <[email protected]> @tomwilkie

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![Build](https://github.com/prometheus/client_java/actions/workflows/build.yml/badge.svg)](https://github.com/prometheus/client_java/actions/workflows/build.yml) <a href="#"><img src="https://img.shields.io/badge/JDK%20compatibility-8+-blue.svg" alt="java 8+"></a> <a href="#"><img src="https://img.shields.io/badge/license-Apache%202.0-blue.svg" alt="Apache 2.0"></a>
44

5-
# Documentation
5+
## Documentation
66

77
[https://prometheus.github.io/client_java](https://prometheus.github.io/client_java)
88

9-
# Contributing and community
9+
## Contributing and community
1010

1111
See [CONTRIBUTING.md](CONTRIBUTING.md) and the [community section](http://prometheus.io/community/)
1212
of the Prometheus homepage.
@@ -15,11 +15,11 @@ The Prometheus Java community is present on the [CNCF Slack](https://cloud-nativ
1515
`#prometheus-java`, and we have a fortnightly community call in
1616
the [Prometheus public calendar](https://prometheus.io/community/).
1717

18-
# Previous Releases
18+
## Previous Releases
1919

2020
The source code for 0.16.0 and older is on
2121
the [simpleclient](https://github.com/prometheus/client_java/tree/simpleclient) branch.
2222

23-
# License
23+
## License
2424

2525
Apache License 2.0, see [LICENSE](LICENSE).

RELEASING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Create a Release
1+
# Create a Release
22

33
1. Go to <https://github.com/prometheus/client_java/releases/new>
44
2. Click on "Choose a tag", enter the tag name (e.g. `v0.1.0`), and click "Create a new tag".

benchmarks/README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,16 @@ See Javadoc of the benchmark classes:
2222
## What Prometheus Java client optimizes for
2323

2424
concurrent updates of metrics in multi-threaded applications.
25-
If your application is single-threaded and uses only one processor core, your application isn't performance critical anyway.
26-
If your application is designed to use all available processor cores for maximum performance, then you want a metric library that doesn't slow your application down.
27-
Prometheus client Java metrics support concurrent updates and scrapes. This shows in benchmarks with multiple threads recording data in shared metrics.
25+
If your application is single-threaded and uses only one processor core, your application isn't
26+
performance critical anyway.
27+
If your application is designed to use all available processor cores for maximum performance, then
28+
you want a metric library that doesn't slow your
29+
application down.
30+
Prometheus client Java metrics support concurrent updates and scrapes. This shows in benchmarks with
31+
multiple threads recording data in shared
32+
metrics.
2833

2934
## Archive
3035

31-
The `src/main/archive/` directory contains the old benchmarks from 0.16.0 and earlier. It will be removed as soon as all benchmarks are ported to the 1.0.0 release.
36+
The `src/main/archive/` directory contains the old benchmarks from 0.16.0 and earlier. It will be
37+
removed as soon as all benchmarks are ported to the 1.0.0 release.

docs/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
## Docs
1+
# Docs
22

33
This directory contains [hugo](https://gohugo.io) documentation to be published in GitHub pages.
44

55
## Run Locally
66

7-
```
7+
```shell
88
hugo server -D
99
```
1010

@@ -20,7 +20,7 @@ Javadoc are not checked-in to the GitHub repository.
2020
They are generated on the fly by GitHub Actions when the docs are updated.
2121
To view locally, run the following:
2222

23-
```
23+
```shell
2424
# note that the 'compile' in the following command is necessary for Javadoc to detect the module structure
2525
./mvnw clean compile javadoc:javadoc javadoc:aggregate
2626
rm -r ./docs/static/api
@@ -30,7 +30,7 @@ mv ./target/site/apidocs ./docs/static/api
3030
GitHub pages are in the `/client_java/` folder, so we link to `/client_java/api` rather than `/api`.
3131
To make JavaDoc work locally, create a link:
3232

33-
```
33+
```shell
3434
mkdir ./docs/static/client_java
3535
ln -s ../api ./docs/static/client_java/api
3636
```
@@ -47,7 +47,7 @@ modifications in `./docs/themes/hugo-geekdoc/`.
4747

4848
Here's how the initial `docs/` folder was set up:
4949

50-
```
50+
```shell
5151
hugo new site docs
5252
cd docs/
5353
mkdir -p themes/hugo-geekdoc/

docs/content/_index.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ The main new features of the 1.0.0 release are:
1313

1414
**Documentation and Examples**
1515

16-
In addition to this documentation page we created an [examples/](https://github.com/prometheus/client_java/tree/main/examples) directory with end-to-end
16+
In addition to this documentation page we created an
17+
[examples/](https://github.com/prometheus/client_java/tree/main/examples) directory with end-to-end
1718
scenarios (Docker compose) illustrating new features.
1819

1920
**Performance Benchmarks**
@@ -26,8 +27,9 @@ synchronization. See Javadoc comments in
2627

2728
**More Info**
2829

29-
The Grafana Labs Blog has a post [Introducing the Prometheus Java Client 1.0.0](https://grafana.com/blog/2023/09/27/introducing-the-prometheus-java-client-1.0.0/) with a
30-
good overview of the release.
30+
The Grafana Labs Blog has a post
31+
[Introducing the Prometheus Java Client 1.0.0](https://grafana.com/blog/2023/09/27/introducing-the-prometheus-java-client-1.0.0/)
32+
with a good overview of the release.
3133

3234
There will also be a presentation at the [PromCon](https://promcon.io) conference on 29 Sep 2023.
3335
Tune in to the live stream on [https://promcon.io](https://promcon.io)

docs/content/exporters/spring.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ Spring anyway. Maybe you want full support for all Prometheus metric types,
2626
or you want to use the new Prometheus native histograms.
2727

2828
The easiest way to use the Prometheus metrics library in Spring is to configure the
29+
[//]: editorconfig-checker-disable-next-line
2930
[PrometheusMetricsServlet](/client_java/api/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.html)
3031
to expose metrics.
3132

@@ -76,6 +77,7 @@ public class DemoApplication {
7677
```
7778

7879
The important part are the last three lines: They configure the
80+
[//]: # editorconfig-checker-disable-next-line
7981
[PrometheusMetricsServlet](/client_java/api/io/prometheus/metrics/exporter/servlet/jakarta/PrometheusMetricsServlet.html)
8082
to expose metrics on `/metrics`:
8183

0 commit comments

Comments
 (0)