Skip to content

Commit

Permalink
[CI] Add pre-commit-config to internal source of truth
Browse files Browse the repository at this point in the history
MODULAR_ORIG_COMMIT_REV_ID: 14e2678c27e07378a49cdfcae41feae5b7c27fb6
  • Loading branch information
patrickdoc authored and modularbot committed Feb 27, 2025
1 parent e9be43e commit ab72aae
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
repos:
- repo: local
hooks:
- id: mojo-format
name: mojo-format
entry: mojo format mojo
language: system
files: '\.(mojo|🔥|py)$'
stages: [commit]
- id: check-docstrings
name: check-docstrings
entry: python3 ./mojo/stdlib/scripts/check-docstrings.py
language: system
pass_filenames: false
stages: [commit]
- id: check-license
name: check-license
entry: mojo mojo/stdlib/scripts/check_licenses.mojo
language: system
files: '\.(mojo|🔥|py)$'
stages: [commit]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
hooks:
- id: markdownlint
args: ['--config', 'mojo/stdlib/scripts/.markdownlint.yaml', '--fix']
2 changes: 1 addition & 1 deletion mojo/stdlib/scripts/check-docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main():
"--diagnose-missing-doc-strings",
"-o",
"/dev/null",
"./stdlib/src",
"./mojo/stdlib/src",
]
result = subprocess.run(command, capture_output=True)
if result.stderr or result.returncode != 0:
Expand Down

0 comments on commit ab72aae

Please sign in to comment.