Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Backend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Arkindex
Backend
Commits
a6676ea0
Verified
Commit
a6676ea0
authored
6 months ago
by
Erwan Rouchet
Browse files
Options
Downloads
Patches
Plain Diff
Move hook to tools/pre-commit-hooks
parent
d16cb01d
No related branches found
No related tags found
1 merge request
!2443
Move hook to tools/pre-commit-hooks
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.pre-commit-config.yaml
+3
-6
3 additions, 6 deletions
.pre-commit-config.yaml
ci/long-test-files.sh
+0
-2
0 additions, 2 deletions
ci/long-test-files.sh
with
3 additions
and
8 deletions
.pre-commit-config.yaml
+
3
−
6
View file @
a6676ea0
...
...
@@ -34,13 +34,10 @@ repos:
-
repo
:
meta
hooks
:
-
id
:
check-useless-excludes
-
repo
:
local
-
repo
:
https://gitlab.teklia.com/tools/pre-commit-hooks
rev
:
0.1.0
hooks
:
-
id
:
long-test-files
name
:
Warn about long unit test files
language
:
script
entry
:
ci/long-test-files.sh
args
:
[
'
1000'
]
# Only run on Arkindex unit test files
files
:
'
^arkindex\/[^\/]*\/tests\/(.*\/)?test_.*\.py'
# Always show output, even when the hook passes, since the hook only warns and doesn't fail
verbose
:
true
This diff is collapsed.
Click to expand it.
ci/long-test-files.sh
deleted
100755 → 0
+
0
−
2
View file @
d16cb01d
#!/bin/sh
wc
-l
"
$@
"
|
awk
'$2 != "total" && $1 > 1000 { OFS=""; print $2, " is too long (", $1, " lines)" }'
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment