mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-22 03:30:35 +00:00
Pending TODO Script Checker in Codebase (#540)
* TODO script * Add todo to Travis * Remove blame from todo check * Print failing todo comments * Fail on failure * Fix todo checker * Don't install godeps * *actually* don't install godeps
This commit is contained in:
parent
1988dd0d5d
commit
f3774edeb1
@ -10,6 +10,12 @@ matrix:
|
||||
script:
|
||||
-
|
||||
go get github.com/alecthomas/gometalinter && gometalinter --install && gometalinter ./... --deadline=10m --exclude=client/internal/client_helper.go
|
||||
- os: linux
|
||||
env:
|
||||
- todos
|
||||
install: true # Skip installing go packages
|
||||
script:
|
||||
- ./scripts/check-todo.sh
|
||||
- os: linux
|
||||
env:
|
||||
- coverage
|
||||
|
10
scripts/check-todo.sh
Executable file
10
scripts/check-todo.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Continuous integration script to check that TODOs are in the correct format
|
||||
OUTPUT="$(grep -PrinH '(?<!context\.)todo(?!\(#{0,1}\d+\))' --include \*.go *)";
|
||||
if [ "$OUTPUT" != "" ] ;
|
||||
then
|
||||
echo "Invalid TODOs found. Failing." >&2;
|
||||
echo "$OUTPUT" >&2;
|
||||
exit 1;
|
||||
fi
|
Loading…
Reference in New Issue
Block a user