Skip to content

Commit 4d73f30

Browse files
committed
chore: add linter
1 parent 8896ad6 commit 4d73f30

File tree

8 files changed

+311
-0
lines changed

8 files changed

+311
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: 🐞 Bug Report
2+
description: File a bug report
3+
title: "[Bug]: "
4+
type: "Bug"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: Also tell us what you expected to happen and how to reproduce the issue.
15+
placeholder: Tell us what you see!
16+
value: "A bug happened!"
17+
validations:
18+
required: true
19+
- type: textarea
20+
id: logs
21+
attributes:
22+
label: Relevant log output
23+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
24+
render: shell
25+
- type: checkboxes
26+
id: terms
27+
attributes:
28+
label: Code of Conduct
29+
description: By submitting this issue, you agree to follow our Code of Conduct
30+
options:
31+
- label: I agree to follow this project's Code of Conduct
32+
required: true
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 💡 Feature Request
2+
description: Suggest an idea for this repository
3+
title: "[Feat]: "
4+
type: "Feature"
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for stopping by to let us know something could be better!
10+
- type: textarea
11+
id: problem
12+
attributes:
13+
label: Is your feature request related to a problem? Please describe.
14+
description: A clear and concise description of what the problem is.
15+
placeholder: Ex. I'm always frustrated when [...]
16+
- type: textarea
17+
id: describe
18+
attributes:
19+
label: Describe the solution you'd like
20+
description: A clear and concise description of what you want to happen.
21+
validations:
22+
required: true
23+
- type: textarea
24+
id: alternatives
25+
attributes:
26+
label: Describe alternatives you've considered
27+
description: A clear and concise description of any alternative solutions or features you've considered.
28+
- type: textarea
29+
id: context
30+
attributes:
31+
label: Additional context
32+
description: Add any other context or screenshots about the feature request here.
33+
- type: checkboxes
34+
id: terms
35+
attributes:
36+
label: Code of Conduct
37+
description: By submitting this issue, you agree to follow our Code of Conduct
38+
options:
39+
- label: I agree to follow this project's Code of Conduct
40+
required: true

.github/linters/.markdownlint.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"default": true,
3+
"MD013": false,
4+
"MD007": {
5+
"indent": 4
6+
},
7+
"MD033": false,
8+
"MD046": false,
9+
"MD024": false
10+
}

.github/linters/.yamllint.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
rules:
2+
line-length:
3+
max: 80
4+
level: warning

.github/pull_request_template.md

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
<!--
2+
Copyright 2026 UCP Authors
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
-->
16+
17+
# Description
18+
19+
Please include a summary of the changes and the related issue. Please also
20+
include relevant motivation and context.
21+
22+
## Type of change
23+
24+
Please delete options that are not relevant.
25+
26+
- [ ] Bug fix (non-breaking change which fixes an issue)
27+
- [ ] New feature (non-breaking change which adds functionality)
28+
- [ ] **Breaking change** (fix or feature that would cause existing
29+
functionality to not work as expected, **including removal of schema files
30+
or fields**)
31+
- [ ] Documentation update
32+
33+
---
34+
35+
### Is this a Breaking Change or Removal?
36+
37+
If you checked "Breaking change" above, or if you are removing **any** schema
38+
files or fields:
39+
40+
- [ ] **I have added `!` to my PR title** (e.g., `feat!: remove field`).
41+
- [ ] **I have added justification below.**
42+
43+
## Breaking Changes / Removal Justification
44+
45+
(Please provide a detailed technical and strategic rationale here for why this
46+
breaking change or removal is necessary.)
47+
48+
---
49+
50+
## Checklist
51+
52+
- [ ] My code follows the style guidelines of this project
53+
- [ ] I have performed a self-review of my own code
54+
- [ ] I have commented my code, particularly in hard-to-understand areas
55+
- [ ] I have made corresponding changes to the documentation
56+
- [ ] My changes generate no new warnings
57+
- [ ] I have added tests that prove my fix is effective or that my feature works
58+
- [ ] New and existing unit tests pass locally with my changes
59+
- [ ] Any dependent changes have been merged and published in downstream modules
60+
61+
---
62+
63+
### Pull Request Title
64+
65+
This repository enforces **Conventional Commits**. Your PR title must follow
66+
this format: `type: description` or `type!: description` for breaking changes.
67+
68+
**Types:**
69+
70+
- `feat`: A new feature
71+
- `fix`: A bug fix
72+
- `docs`: Documentation only changes
73+
- `style`: Changes that do not affect the meaning of the code (white-space,
74+
formatting, etc)
75+
- `refactor`: A code change that neither fixes a bug nor adds a feature
76+
- `perf`: A code change that improves performance
77+
- `test`: Adding missing tests or correcting existing tests
78+
- `chore`: Changes to the build process or auxiliary tools and libraries
79+
80+
**Breaking Changes:**
81+
82+
If your change is a breaking change (e.g., removing a field or file), you
83+
**must** add `!` before the colon in your title:
84+
`type!: description`
85+
86+
**Examples:**
87+
88+
- `feat: add new payment gateway`
89+
- `fix: resolve crash on checkout`
90+
- `docs: update setup guide`
91+
- `feat!: remove deprecated buyer field from checkout`
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: "Conventional Commits"
16+
17+
on:
18+
pull_request:
19+
types:
20+
- opened
21+
- edited
22+
- synchronize
23+
24+
permissions:
25+
contents: read
26+
27+
jobs:
28+
main:
29+
permissions:
30+
pull-requests: read
31+
statuses: write
32+
name: Validate PR Title
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: semantic-pull-request
36+
uses: amannn/action-semantic-pull-request@v6
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
with:
40+
validateSingleCommit: false

.github/workflows/linter.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Lint Code Base
16+
17+
on:
18+
pull_request:
19+
branches: [main]
20+
21+
permissions:
22+
contents: read # Required to checkout the code
23+
packages: read # Required to pull the Super-Linter docker image
24+
statuses: write # Required to fix the 403 error (updating status checks)
25+
26+
jobs:
27+
build:
28+
name: Lint Code Base
29+
runs-on: ubuntu-latest
30+
31+
steps:
32+
- name: Checkout Code
33+
uses: actions/checkout@v5
34+
with:
35+
fetch-depth: 0
36+
37+
- name: Lint Code Base
38+
uses: super-linter/super-linter/slim@v8
39+
env:
40+
DEFAULT_BRANCH: origin/main
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
MARKDOWN_CONFIG_FILE: ".markdownlint.json"
43+
PYTHON_RUFF_CONFIG_FILE: ../../pyproject.toml
44+
PYTHON_RUFF_FORMAT_CONFIG_FILE: ../../pyproject.toml
45+
PYTHON_RUFF_FORMAT_CHECK_ONLY_MODE_OPTIONS: "--check --diff"
46+
LOG_LEVEL: INFO
47+
SHELLCHECK_OPTS: -e SC1091 -e 2086
48+
VALIDATE_ALL_CODEBASE: false
49+
FILTER_REGEX_EXCLUDE: "^(\\.github/|\\.vscode/).*|CODE_OF_CONDUCT.md|CHANGELOG.md"
50+
VALIDATE_BIOME_FORMAT: false
51+
VALIDATE_PYTHON_BLACK: false
52+
VALIDATE_PYTHON_FLAKE8: false
53+
VALIDATE_PYTHON_ISORT: false
54+
VALIDATE_PYTHON_MYPY: false
55+
VALIDATE_PYTHON_PYLINT: false
56+
VALIDATE_PYTHON_RUFF: false
57+
VALIDATE_CHECKOV: false
58+
VALIDATE_NATURAL_LANGUAGE: false
59+
VALIDATE_MARKDOWN_PRETTIER: false
60+
VALIDATE_JAVASCRIPT_PRETTIER: false
61+
VALIDATE_JSON_PRETTIER: false
62+
VALIDATE_YAML_PRETTIER: false
63+
VALIDATE_GIT_COMMITLINT: false
64+
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
65+
VALIDATE_JSCPD: false

.github/workflows/spellcheck.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: "Check Spelling"
16+
on:
17+
pull_request:
18+
19+
jobs:
20+
spellcheck:
21+
runs-on: ubuntu-latest
22+
permissions:
23+
contents: read
24+
actions: read
25+
steps:
26+
- uses: actions/checkout@v4
27+
- uses: streetsidesoftware/cspell-action@v7
28+
with:
29+
incremental_files_only: true

0 commit comments

Comments
 (0)