Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Move Ruff rules to dedicated ruff.toml config, and add pre-commit setup #184

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
ci: add pre-commit config
aaronsteers committed Dec 20, 2024
commit ac81f465ca96a1246118918265e149db2f3c2cab
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
exclude: |
(?x)(
# Python/system files
^.*?/\.venv/.*$|
^.*?/node_modules/.*$|

# Generated files
^.*?/generated/.*$|
)

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.3
hooks:
# Run the linter.
- id: ruff
args:
- --fix
- --select=I

# Run the formatter.
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
hooks:
- id: prettier
types_or: [json, yaml]
additional_dependencies:
- prettier@3.0.3

- repo: local
hooks:
- id: addlicense
name: Add license headers
entry: addlicense -c "Airbyte, Inc." -l apache -v -f LICENSE_SHORT
language: golang
additional_dependencies: [github.com/google/addlicense@v1.1.1]
files: \.py$