Skip to content

Commit

Permalink
Modify pre-commit-config, switch to prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
manics committed Jun 13, 2023
1 parent b61fd84 commit 0e454d6
Showing 1 changed file with 83 additions and 40 deletions.
123 changes: 83 additions & 40 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,43 +1,86 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/awslabs/git-secrets
rev: 80230afa8c8bdeac766a0fece36f95ffaa0be778
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: git-secrets
verbose: true
entry: 'git-secrets --register-aws'
language: script
name: git-secrets-register-aws-provider
- id: git-secrets
verbose: true
entry: 'git-secrets --scan'
language: script
name: git-secrets-scan
- repo: https://github.com/markdownlint/markdownlint
rev: v0.11.0
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-docstring-first
- id: check-json
- id: check-added-large-files
- id: debug-statements
- id: name-tests-test
- id: requirements-txt-fixer
- repo: https://github.com/pycqa/isort
rev: 5.11.5
hooks:
- id: markdownlint
name: Markdownlint
description: Run markdownlint on your Markdown files
entry: mdl .
language: ruby
files: \.(md|mdown|markdown)$
verbose: true
args:
- "-s"
- "mdl_style.rb"
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.59.1
hooks:
- id: cfn-python-lint
files: src/.*(Cfn)\.(yml|yaml)$
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.1.0
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.7+
# - repo: https://github.com/pycqa/flake8
# rev: 6.0.0
# hooks:
# - id: flake8
# args:
# [
# "--max-line-length=200",
# "--ignore=E203,W503",
# "--max-cognitive-complexity=17",
# "--max-expression-complexity=9",
# ]
# additional_dependencies: [
# flake8-bugbear, # Detect potential bugs
# flake8-builtins, # Check for built-ins being used as variables
# flake8-cognitive-complexity, # Check max function complexity
# flake8-comprehensions, # Suggestions for better list/set/dict comprehensions
# flake8-eradicate, # Find dead/commented out code
# flake8-expression-complexity, # Check max expression complexity
# flake8-fixme, # Check for FIXME, TODO, and XXX left in comments
# flake8-logging-format, # Validate (lack of) logging format strings
# flake8-mutable, # Check for mutable default arguments
# flake8-pie, # Misc. linting rules
# flake8-pytest-style, # Check against pytest style guide
# flake8-return, # Check return statements
# flake8-simplify, # Suggestions to simplify code
# flake8-use-fstring, # Encourages use of f-strings vs old style
# pep8-naming, # Check PEP8 class naming
# ]
- repo: https://github.com/Lucas-C/pre-commit-hooks-safety
rev: v1.3.1
hooks:
- id: python-safety-dependencies-check
# - repo: https://github.com/awslabs/git-secrets
# rev: 99d01d58ebcc06e237c0e3f3ff5ae628aeef6aa6
# hooks:
# - id: git-secrets
# verbose: true
# entry: "git-secrets --register-aws"
# language: script
# name: git-secrets-register-aws-provider
# - id: git-secrets
# verbose: true
# entry: "git-secrets --scan"
# language: script
# name: git-secrets-scan
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
- repo: https://github.com/awslabs/cfn-python-lint
rev: v0.59.1
hooks:
- id: cfn-python-lint
files: src/.*(Cfn)\.(yml|yaml)$
- repo: https://github.com/PyCQA/bandit
rev: "1.7.4"
hooks:
- id: bandit
entry: bandit
exclude: ^tests/

# workspace_backup/ has it's own pre-commit-config.yaml
# egress_app_* are being moved to their own repos
exclude: '^src/components/(egress_app_backend|egress_app_frontend|workspace_backup)/'

0 comments on commit 0e454d6

Please sign in to comment.