Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7d8c1f55
Commit
7d8c1f55
authored
Sep 16, 2020
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add assert detector
parent
fdf60f09
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
Makefile
Makefile
+6
-1
_support/detect-assert.sh
_support/detect-assert.sh
+9
-0
No files found.
Makefile
View file @
7d8c1f55
...
...
@@ -112,7 +112,7 @@ testdata/scratch:
mkdir
-p
testdata/scratch
.PHONY
:
verify
verify
:
lint vet detect-context check-formatting staticcheck
verify
:
lint vet detect-context
detect-assert
check-formatting staticcheck
.PHONY
:
lint
lint
:
$(TARGET_SETUP)
...
...
@@ -130,6 +130,11 @@ detect-context: $(TARGET_SETUP)
$(
call
message,Verify:
$@
)
_support/detect-context.sh
.PHONY
:
detect-assert
detect-assert
:
$(
call
message,Verify:
$@
)
_support/detect-assert.sh
.PHONY
:
check-formatting
check-formatting
:
$(TARGET_SETUP) install-goimports
$(
call
message,Verify:
$@
)
...
...
_support/detect-assert.sh
0 → 100755
View file @
7d8c1f55
#!/bin/sh
git
grep
'testify/assert"'
|
\
grep
-e
'^[^:]*\.go'
|
\
awk
'{
print "error: please use testify/require instead of testify/assert"
print
exit 1
}'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment