1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586 |
- exclude: >
- (?x)(
- LICENSE$|
- \.snap$|
- \.map$|
- \.map\.js$|
- ^tests/sentry/lang/.*/fixtures/|
- ^tests/fixtures/|
- ^src/sentry/static/sentry/vendor/|
- ^tests/sentry/lang/javascript/example-project/|
- ^src/.*/locale/|
- ^src/sentry/data/
- )
- repos:
- # For some tools, we install them locally (in the virtualenv).
- # This makes it easier to use them directly (as opposed to pre-commit run),
- # and it's also faster as pre-commit doesn't have to manage them.
- # The thing we lose here is autoupdate, but we have git hooks that
- # let you know when requirements-pre-commit.txt changes.
- - repo: local
- hooks:
- - id: pyupgrade
- name: pyupgrade
- entry: pyupgrade
- args: ['--py38-plus', '--keep-runtime-typing']
- language: system
- types: [python]
- # We can't change this mock to unittest.mock until Python 3.8,
- # refer to the comment in this file.
- exclude: 'src/sentry/utils/compat/mock.py'
- # Configuration for black exists in pyproject.toml,
- # but we let pre-commit take care of the file filtering.
- - id: black
- name: black
- entry: black
- language: system
- types: [python]
- # Configuration for isort exists in pyproject.toml,
- # but we let pre-commit take care of the file filtering.
- - id: isort
- name: isort
- entry: isort
- language: system
- types: [python]
- # Configuration for flake8 exists in setup.cfg,
- # but we let pre-commit take care of the file filtering.
- - id: flake8
- name: flake8
- entry: flake8
- language: system
- types: [python]
- log_file: '.artifacts/flake8.pycodestyle.log'
- - id: lint-requirements
- name: lint-requirements
- entry: bin/lint-requirements
- language: system
- files: requirements-base.txt
- pass_filenames: false
- - id: pyright
- name: pyright
- entry: pyright
- language: node
- types: [ python ]
- pass_filenames: true
- additional_dependencies: [ "pyright@1.1.186" ]
- args: [ '--project', 'pyrightconfig-commithook.json' ]
- - repo: https://github.com/sirosen/check-jsonschema
- rev: 0.3.0
- hooks:
- - id: check-github-actions
- - id: check-github-workflows
- - repo: https://github.com/pre-commit/pre-commit-hooks
- rev: v4.0.1
- hooks:
- - id: check-case-conflict
- - id: check-executables-have-shebangs
- - id: check-merge-conflict
- - id: check-symlinks
- - id: end-of-file-fixer
- exclude_types: [svg]
- - id: trailing-whitespace
- exclude_types: [svg]
- - id: debug-statements
|