Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mpsd-software-manager
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MPSD Computational Science
mpsd-software-manager
Merge requests
!78
Add pre-commit hooks
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add pre-commit hooks
add-pre-commit-hook
into
main
Overview
18
Commits
16
Pipelines
12
Changes
1
Merged
Ashwin Kumar Karnad
requested to merge
add-pre-commit-hook
into
main
1 year ago
Overview
18
Commits
16
Pipelines
12
Changes
1
Expand
0
0
Merge request reports
Viewing commit
b34029b2
Prev
Next
Show latest version
1 file
+
58
−
0
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
b34029b2
add basic precommit hook config
· b34029b2
Ashwin Kumar Karnad
authored
1 year ago
.pre-commit-config.yaml
0 → 100644
+
58
−
0
Options
# Config based on https://gitlab.com/octopus-code/postopus/-/blob/main/.pre-commit-config.yaml
repos
:
-
repo
:
https://github.com/pre-commit/pre-commit-hooks
rev
:
v4.4.0
hooks
:
-
id
:
trailing-whitespace
-
id
:
check-ast
-
id
:
check-docstring-first
-
id
:
check-executables-have-shebangs
-
id
:
check-json
-
id
:
check-merge-conflict
-
id
:
check-xml
-
id
:
check-yaml
-
id
:
check-toml
-
id
:
debug-statements
-
id
:
end-of-file-fixer
-
id
:
requirements-txt-fixer
-
id
:
mixed-line-ending
args
:
[
'
--fix=auto'
]
# replace 'auto' with 'lf' to enforce Linux/Mac line endings or 'crlf' for Windows
# other hooks
# Ruff:
-
repo
:
https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev
:
v0.0.274
hooks
:
-
id
:
ruff
args
:
[
--fix
,
--exit-non-zero-on-fix
]
# Black
-
repo
:
https://github.com/psf/black
rev
:
22.12.0
hooks
:
-
id
:
black
language_version
:
python3
## If like to embrace black styles even in the docs:
# - repo: https://github.com/asottile/blacken-docs
# rev: v1.9.1
# hooks:
# - id: blacken-docs
# additional_dependencies: [black]
# pydocstyle
-
repo
:
https://github.com/PyCQA/pydocstyle
rev
:
6.1.1
hooks
:
-
id
:
pydocstyle
name
:
pydocstyle
description
:
pydocstyle is a static analysis tool for checking compliance with Python docstring conventions.
entry
:
pydocstyle
language
:
python
types
:
[
python
]
-
repo
:
https://github.com/abravalheri/validate-pyproject
rev
:
v0.10.1
hooks
:
-
id
:
validate-pyproject
Loading