File: .pre-commit-config.yaml

package info (click to toggle)
python-neutron-lib 3.21.1-3
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 7,660 kB
  • sloc: python: 22,829; sh: 137; makefile: 24
file content (64 lines) | stat: -rw-r--r-- 2,035 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
default_language_version:
  # force all unspecified python hooks to run python3
  python: python3
repos:
  - repo: https://github.com/pre-commit/pre-commit-hooks
    rev: v5.0.0
    hooks:
      - id: trailing-whitespace
      - id: mixed-line-ending
        args: ['--fix', 'lf']
        exclude: '.*\.(svg)$'
      - id: check-byte-order-marker
      - id: check-executables-have-shebangs
      - id: check-json
      - id: check-merge-conflict
      - id: debug-statements
  - repo: https://github.com/PyCQA/bandit
    rev: 1.8.3
    hooks:
      - id: bandit
        # B104: Possible binding to all interfaces
        # B303: Blacklist use of insecure MD2, MD4, MD5, or SHA1 hash functions
        # B311: Standard pseudo-random generators are not suitable for security/cryptographic purpose
        args: ['-n5', '-sB104,B303,B311']
        files: 'neutron_lib/'
        exclude: 'neutron_lib/tests'
  - repo: https://github.com/Lucas-C/pre-commit-hooks
    rev: v1.5.5
    hooks:
      - id: remove-tabs
        exclude: '.*\.(svg)$'
  - repo: https://github.com/pre-commit/mirrors-mypy
    rev: v1.15.0
    hooks:
      - id: mypy
        pass_filenames: false
  - repo: https://opendev.org/openstack/hacking
    rev: 7.0.0
    hooks:
      - id: hacking
        additional_dependencies:
          - flake8-import-order~=0.18.2
          - neutron
        exclude: '^(doc|releasenotes|tools)/.*$'
  - repo: local
    hooks:
      - id: check-unit-test-structure
        name: check unit test structure
        language: script
        require_serial: true
        pass_filenames: false
        entry: './tools/check_unit_test_structure.sh'
        files: '^.*\.py$'
        exclude: '^(doc|releasenotes|tools)/.*$'
# TODO(slaweq): enable pylint check once all issues in the current code will
# be solved
#     - id: pylint
#       name: pylint
#       entry: .tox/pep8/bin/pylint
#       files: ^neutron_lib/
#       language: system
#       types: [python]
#       args: ['--rcfile=.pylintrc', '--output-format=colorized']