mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-06-26 22:19:57 +00:00

### What problem does this PR solve? Sometimes after we commit the code and open the PR the CI pipeline fails in Ruff checks. Including a pre-commit we can identify this problem early and avoid time loss. ### Type of change - [ ] Bug Fix (non-breaking change which fixes an issue) - [X] New Feature (non-breaking change which adds functionality) - [ ] Documentation Update - [ ] Refactoring - [ ] Performance Improvement - [ ] Other (please describe):
20 lines
470 B
YAML
20 lines
470 B
YAML
repos:
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
rev: v4.6.0
|
|
hooks:
|
|
- id: check-yaml
|
|
- id: check-json
|
|
- id: end-of-file-fixer
|
|
- id: trailing-whitespace
|
|
- id: check-case-conflict
|
|
- id: check-merge-conflict
|
|
- id: mixed-line-ending
|
|
- id: check-symlinks
|
|
|
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
rev: v0.11.6
|
|
hooks:
|
|
- id: ruff
|
|
args: [ --fix ]
|
|
- id: ruff-format
|