Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-workhorse
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-workhorse
Commits
619f8dd3
Commit
619f8dd3
authored
Oct 26, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only alert on context.Background in go files
parent
7a8b6063
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
_support/detect-context.sh
_support/detect-context.sh
+4
-1
No files found.
_support/detect-context.sh
View file @
619f8dd3
#!/bin/sh
git
grep
'context.\(Background\|TODO\)'
|
grep
-v
-e
'^[^:]*_test.go:'
-e
'^vendor/'
-e
'^_support/'
|
awk
'{
git
grep
'context.\(Background\|TODO\)'
|
\
grep
-v
-e
'^[^:]*_test\.go:'
-e
'^vendor/'
-e
'^_support/'
|
\
grep
-e
'^[^:]*\.go'
|
\
awk
'{
print "Found disallowed use of context.Background or TODO"
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