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

[412 and 408 HUBBLE ] - Automated linting #404

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
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
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,24 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- id: file_changes
uses: trilom/[email protected]
with:
output: " "

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.8

- uses: pre-commit/[email protected]
env:
extra_args: --color=always --files ${{ steps.file_changes.outputs.files}}

tests:
runs-on: ubuntu-latest
Expand Down
43 changes: 28 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# ci:
# autofix_commit_msg: "[skip ci] `pre-commit` auto fix"
# autofix_prs: true
# autoupdate_branch: ""
# autoupdate_commit_msg: "[skip ci] `pre-commit` autoupdate"
# autoupdate_schedule: weekly
# skip: []
# submodules: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files # prevents giant files from being committed.
- id: check-case-conflict # checks for files that would conflict in case-insensitive filesystems.
Expand All @@ -21,25 +12,47 @@ repos:
- id: requirements-txt-fixer # sorts entries in requirements.txt.
- id: trailing-whitespace # trims trailing whitespace.

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: pretty-format-json # pretty formats json files.
args: ["--autofix"]

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.8.0-1
hooks:
- id: shfmt
args:
- -w
# List files that will be formatted
- --list
# Indent by two spaces
- --indent
- "4"
# Binary operators may start a line
- --binary-next-line
# Switch cases are indented
- --case-indent

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.3
rev: v3.1.0
hooks:
- id: prettier
files: \.(json|markdown|md|yaml|yml)$
files: \.(markdown|md|yaml|yml)$
language_version: 14.21.3

- repo: https://github.com/hadialqattan/pycln
rev: v2.3.0
rev: v2.4.0
hooks:
- id: pycln

- repo: https://github.com/psf/black
rev: 23.11.0
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: ["--profile=black", "--magic-placement"]
Expand Down
Loading
Loading