Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
18 changes: 9 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
default_language_version:
python: python3.9
fail_fast: True
default_stages: [pre-push]
default_stages: [pre-push, pre-commit]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
Expand All @@ -49,9 +49,9 @@ repos:
hooks:
- id: run-black
name: Running Black...
entry: docker/lint.sh python_format
entry: docker/lint.sh python_format -i
language: system
always_run: true
files: \.py$
pass_filenames: false
- id: run-file-checks
name: Checking File Types....
Expand All @@ -61,25 +61,25 @@ repos:
pass_filenames: false
- id: run-headers-check
name: Checking ASF License Headers ...
entry: docker/lint.sh asf
entry: docker/lint.sh asf -i
language: system
always_run: true
pass_filenames: false
- id: run-headers-check
- id: run-cpplint
name: Linting the C++ code ...
entry: docker/lint.sh cpplint
language: system
always_run: true
files: \.(c|cc|cpp|h|hpp)$
pass_filenames: false
- id: run-clang-format
name: Checking Clang format ...
entry: docker/lint.sh clang_format
entry: docker/lint.sh clang_format -i
language: system
always_run: true
files: \.(c|cc|cpp|h|hpp)$
pass_filenames: false
- id: run-mypy
name: Type Checking with MyPY ...
entry: docker/lint.sh mypy
language: system
always_run: true
files: \.py$
pass_filenames: false
6 changes: 5 additions & 1 deletion docker/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,11 @@ function run_lint_step() {
shift

if [ $validate_only -eq 0 ]; then
run_docker -it "ci_lint" "${cmd[@]}"
if [ -t 0 ]; then
run_docker -it "ci_lint" "${cmd[@]}"
else
run_docker "ci_lint" "${cmd[@]}"
fi
fi
}

Expand Down
Loading