Skip to content

Commit 10b2b1e

Browse files
committed
chore(ci): Ignore duration literals inside code blocks when linting time units, fix lefthook tag delimiters.
1 parent 57ed336 commit 10b2b1e

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

.ci/vale/styles/Google/Units.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ nonword: true
55
level: error
66
tokens:
77
- \b\d+(?:B|kB|MB|GB|TB)
8-
- \b\d+(?:ns|ms|s|min|h|d)
8+
# Ignore duration literals in code blocks.
9+
- \b(?!\`)\d+(?:ns|ms|s|min|h|d)

lefthook.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,49 +10,49 @@ pre-commit:
1010
parallel: true
1111
commands:
1212
cloud-lint:
13-
tags: lint v2
13+
tags: lint,v2
1414
glob: "content/influxdb/cloud/**/*.md"
1515
run: '.ci/vale/vale.sh
1616
--config=.vale.ini
1717
--minAlertLevel=error {staged_files}'
1818
cloud-dedicated-lint:
19-
tags: lint v3
19+
tags: lint,v3
2020
glob: "content/influxdb/cloud-dedicated/**/*.md"
2121
run: '.ci/vale/vale.sh
2222
--config=content/influxdb/cloud-dedicated/.vale.ini
2323
--minAlertLevel=error {staged_files}'
2424
cloud-serverless-lint:
25-
tags: lint v3
25+
tags: lint,v3
2626
glob: "content/influxdb/cloud-serverless/**/*.md"
2727
run: '.ci/vale/vale.sh
2828
--config=content/influxdb/cloud-serverless/.vale.ini
2929
--minAlertLevel=error {staged_files}'
3030
clustered-lint:
31-
tags: lint v3
31+
tags: lint,v3
3232
glob: "content/influxdb/clustered/**/*.md"
3333
run: '.ci/vale/vale.sh
3434
--config=content/influxdb/cloud-serverless/.vale.ini
3535
--minAlertLevel=error {staged_files}'
3636
telegraf-lint:
37-
tags: lint clients
37+
tags: lint,clients
3838
glob: "content/telegraf/**/*.md"
3939
run: '.ci/vale/vale.sh
4040
--config=.vale.ini
4141
--minAlertLevel=error {staged_files}'
4242
v2-lint:
43-
tags: lint v2
43+
tags: lint,v2
4444
glob: "content/influxdb/v2/**/*.md"
4545
run: '.ci/vale/vale.sh
4646
--config=content/influxdb/v2/.vale.ini
4747
--minAlertLevel=error {staged_files}'
4848
cloud-pytest:
4949
glob: content/influxdb/cloud/**/*.md
50-
tags: test codeblocks v2
50+
tags: test,codeblocks,v2
5151
env:
5252
- SERVICE: cloud-pytest
5353
run: docker compose run $SERVICE '{staged_files}'
5454
cloud-dedicated-pytest:
55-
tags: test codeblocks v3
55+
tags: test,codeblocks,v3
5656
glob: content/influxdb/cloud-dedicated/**/*.md
5757
env:
5858
- SERVICE: cloud-dedicated-pytest
@@ -61,13 +61,13 @@ pre-commit:
6161
docker compose run $SERVICE {staged_files} ;
6262
./test/scripts/monitor-tests.sh stop $SERVICE
6363
cloud-serverless-pytest:
64-
tags: test codeblocks v3
64+
tags: test,codeblocks,v3
6565
glob: content/influxdb/cloud-serverless/**/*.md
6666
env:
6767
- SERVICE: cloud-serverless-pytest
6868
run: docker compose run $SERVICE '{staged_files}'
6969
clustered-pytest:
70-
tags: test codeblocks v3
70+
tags: test,codeblocks,v3
7171
glob: content/influxdb/clustered/**/*.md
7272
env:
7373
- SERVICE: clustered-pytest
@@ -76,19 +76,19 @@ pre-commit:
7676
docker compose run $SERVICE {staged_files} ;
7777
./test/scripts/monitor-tests.sh stop $SERVICE
7878
telegraf-pytest:
79-
tags: test codeblocks
79+
tags: test,codeblocks
8080
glob: content/telegraf/**/*.md
8181
env:
8282
- SERVICE: telegraf-pytest
8383
run: docker compose run $SERVICE '{staged_files}'
8484
v2-pytest:
85-
tags: test codeblocks v2
85+
tags: test,codeblocks,v2
8686
glob: content/influxdb/v2/**/*.md
8787
env:
8888
- SERVICE: v2-pytest
8989
run: docker compose run --rm $SERVICE '{staged_files}'
9090
prettier:
91-
tags: frontend style
91+
tags: frontend,style
9292
glob: "*.{css,js,ts,jsx,tsx}"
9393
run: yarn prettier {staged_files}
9494

0 commit comments

Comments
 (0)