Skip to content

Commit ef780e2

Browse files
authored
fix(ci): lint checker (#2422)
Signed-off-by: ashing <[email protected]>
1 parent 8bf55a0 commit ef780e2

File tree

13 files changed

+2369
-35
lines changed

13 files changed

+2369
-35
lines changed

.asf.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# 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, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
github:
19+
description: APISIX Ingress Controller for Kubernetes
20+
homepage: https://apisix.apache.org/
21+
labels:
22+
- ingress
23+
- kubernetes
24+
- controller
25+
- apisix
26+
- crds
27+
- k8s
28+
- apigateway
29+
- microservices
30+
- api
31+
- kubernetes-ingress
32+
- loadbalancing
33+
- devops
34+
35+
enabled_merge_buttons:
36+
squash: true
37+
merge: false
38+
rebase: false
39+
protected_branches:
40+
master:
41+
required_pull_request_reviews:
42+
required_approving_review_count: 2
43+
v1.5.0:
44+
required_pull_request_reviews:
45+
required_approving_review_count: 1
46+
v1.6.0:
47+
required_pull_request_reviews:
48+
required_approving_review_count: 1
49+
1.7.0:
50+
required_pull_request_reviews:
51+
required_approving_review_count: 1
52+
1.8.0:
53+
required_pull_request_reviews:
54+
required_approving_review_count: 1

.github/workflows/lint-checker.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ jobs:
9292
with:
9393
node-version: '20.7.x'
9494
- run: npm install -g [email protected]
95-
- run: markdownlint '**/*.md' --ignore node_modules --ignore CHANGELOG.md --ignore docs/en/latest/references/v2.md
95+
- run: |
96+
markdownlint '**/*.md' \
97+
--ignore node_modules \
98+
--ignore CHANGELOG.md \
99+
--ignore docs/crd/api.md \
100+
--ignore docs/gateway-api.md
96101
markdown-link-check:
97102
needs: changes
98103
if: |
@@ -108,8 +113,8 @@ jobs:
108113
use-quiet-mode: 'yes'
109114
use-verbose-mode: 'yes'
110115
config-file: 'link-check-config.json'
111-
folder-path: 'docs/en'
112-
file-path: './README.md, ./install.md, ./test/e2e/README.md'
116+
folder-path: 'docs'
117+
file-path: './README.md'
113118
max-depth: -1
114119
file-extension: ".md"
115120
check-modified-files-only: "no"

.github/workflows/yamllint-checker.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
id: filter
4343
with:
4444
token: ${{ secrets.GITHUB_TOKEN }}
45-
# focus on `samples/deploy` yaml files directory
45+
# focus on `examples` yaml files directory
4646
filters: |
4747
yaml:
48-
- 'samples/deploy/**/*'
48+
- 'examples/**/*'
4949
yamllint-checker:
5050
needs: changes
5151
if: |
@@ -58,4 +58,4 @@ jobs:
5858
python-version: '3.10'
5959
- run: pip install yamllint==1.29.0
6060
- name: 🚀 Run yamllint
61-
run: yamllint samples/deploy # focus on `samples/deploy` yaml files directory
61+
run: yamllint examples # focus on `examples` yaml files directory

.licenserc.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# 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, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
header:
18+
license:
19+
spdx-id: Apache-2.0
20+
copyright-owner: Apache Software Foundation
21+
22+
paths-ignore:
23+
- 'dist'
24+
- 'vendor'
25+
- 'licenses'
26+
- '**/*.md'
27+
- '**/*.mdx'
28+
- '**/testdata/**'
29+
- '**/go.mod'
30+
- '**/go.sum'
31+
- 'LICENSE'
32+
- 'NOTICE'
33+
- '**/assets/header-templates/**'
34+
- '**/assets/lcs-templates/**'
35+
- '**/assets/languages.yaml'
36+
- '**/assets/assets.gen.go'
37+
- '**/*.json'
38+
- '.github/ISSUE_TEMPLATE'
39+
- '.github/PULL_REQUEST_TEMPLATE'
40+
- 'pkg/kube/apisix/client/**'
41+
- '**/zz_generated.deepcopy.go'
42+
- 'utils/generate-groups.sh'
43+
- '**/*.pem'
44+
- '**/*.key'
45+
- '.gitattributes'
46+
comment: on-failure

.markdownlint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# 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, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
# MD004/ul-style Unordered list style
19+
MD004: false
20+
21+
# MD013 Line length
22+
MD013: false
23+
24+
#MD029/ol-prefix Ordered list item prefix
25+
MD029: false
26+
27+
# MD033 Inline HTML
28+
MD033: false
29+
30+
# MD036/no-emphasis-as-heading/no-emphasis-as-header Emphasis used instead of a heading
31+
MD036: false
32+
33+
MD041: false
34+
35+
# MD024
36+
no-duplicate-heading:
37+
siblings_only: true

.yamllint.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one
3+
# or more contributor license agreements. See the NOTICE file
4+
# distributed with this work for additional information
5+
# regarding copyright ownership. The ASF licenses this file
6+
# to you under the Apache License, Version 2.0 (the
7+
# "License"); you may not use this file except in compliance
8+
# with the License. You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing,
13+
# software distributed under the License is distributed on an
14+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
# KIND, either express or implied. See the License for the
16+
# specific language governing permissions and limitations
17+
# under the License.
18+
19+
---
20+
21+
yaml-files:
22+
- '*.yaml'
23+
- '*.yml'
24+
- '.yamllint'
25+
26+
rules:
27+
braces: disable # default: enable
28+
brackets: disable # default: enable
29+
colons: enable
30+
commas: disable # default: enable
31+
comments: disable # default: {level: warning}
32+
comments-indentation: disable # default: {level: warning}
33+
document-end: disable
34+
document-start: disable # default: {level: warning}
35+
empty-lines: enable
36+
empty-values: enable
37+
float-values: disable
38+
hyphens: enable
39+
indentation: enable
40+
key-duplicates: enable
41+
key-ordering: disable
42+
line-length: disable # default: enable
43+
new-line-at-end-of-file: disable # default: enable
44+
new-lines: enable
45+
octal-values: disable
46+
quoted-strings: disable
47+
trailing-spaces: enable
48+
truthy:
49+
level: warning

0 commit comments

Comments
 (0)