Skip to content

Commit 0cb8949

Browse files
committed
Add lychee link checker with pre-commit
1 parent ac3b180 commit 0cb8949

File tree

3 files changed

+38
-1
lines changed

3 files changed

+38
-1
lines changed

.github/linters/lychee.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
exclude = [
19+
"https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.1/html/Release_Notes/version-4.2.html#issues-fixed-4.2.1",
20+
"https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes/index.html",
21+
"https://cloudstack.apache.org/survey.html",
22+
"https://downloads.chef.io/chef-dk/",
23+
"https://github.com/YOUR_ACCOUNT/cloudstack",
24+
"https://iconka.com/en/downloads/cat-power/",
25+
"https://issues.apache.org/.*",
26+
"http://localhost:5050/",
27+
"https://markmail.org/.*",
28+
"https://viserjs.github.io/docs.html#/viser/guide/installation"]

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,12 @@ repos:
138138
types: [yaml]
139139
files: \.ya?ml$
140140
exclude: ^.*k8s-.*\.ya?ml$
141+
- repo: https://github.com/lycheeverse/lychee.git
142+
rev: lychee-v0.20.1
143+
hooks:
144+
- id: lychee
145+
name: run lychee
146+
description: run lychee a fast, async, stream-based link checker written in Rust
147+
args: [--config=.github/linters/lychee.toml]
148+
files: \.md$
149+
stages: [manual]

PRE-COMMIT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# pre-commit
2121

2222
We run [pre-commit](https://pre-commit.com/) with
23-
[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/linter.yml) so installation on your
23+
[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/pre-commit.yml) so installation on your
2424
local machine is currently optional.
2525

2626
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)

0 commit comments

Comments
 (0)