Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
],
"dictionaryDefinitions": [
{
"name": "custom-words",
"path": ".cspell/custom-words.txt",
"addWords": true
"name": "custom-words",
"path": ".cspell/custom-words.txt",
"addWords": true
}
],
"dictionaries": [
Expand Down
2 changes: 2 additions & 0 deletions .cspell/custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ renderable
repudiable
schemas
sdjwt
shellcheck
codespell
shopify
superfences
vulnz
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: pre-commit

on:
pull_request:
push:
branches: [main]

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: pre-commit/action@v3.0.1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.ruff_cache
uv.lock
.venv
node_modules/
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

exclude: '^(\.github/|\.vscode/|node_modules/).*|CODE_OF_CONDUCT\.md|CHANGELOG\.md'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: [--unsafe]
- id: check-json
- id: check-added-large-files
- id: check-shebang-scripts-are-executable
- id: check-executables-have-shebangs
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.13
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
files: \.(json|md|yaml|yml)$
- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
hooks:
- id: shellcheck
args: ["-e", "SC1091", "-e", "SC2086"]
- repo: https://github.com/codespell-project/codespell
rev: v2.4.1
hooks:
- id: codespell
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
2 changes: 1 addition & 1 deletion test_data/flower_shop/discounts.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
code,type,value,description
10OFF,percentage,10,10% Off
WELCOME20,percentage,20,20% Off
FIXED500,fixed_amount,500,$5.00 Off
FIXED500,fixed_amount,500,$5.00 Off
2 changes: 1 addition & 1 deletion test_data/flower_shop/products.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ pot_ceramic,Ceramic Pot,1500,https://example.com/pot.jpg
bouquet_sunflowers,Sunflower Bundle,2500,https://example.com/sunflowers.jpg
bouquet_tulips,Spring Tulips,3000,https://example.com/tulips.jpg
orchid_white,White Orchid,4500,https://example.com/orchid.jpg
gardenias,Gardenias,2000,https://example.com/gardenias.jpg
gardenias,Gardenias,2000,https://example.com/gardenias.jpg
Loading