By default, using go with package will only validate the go file for the
current platform (or at last misses file_windows.go for example). This
tries to fix that.
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
| ... | ... |
@@ -41,7 +41,9 @@ packages=( |
| 41 | 41 |
|
| 42 | 42 |
errors=() |
| 43 | 43 |
for p in "${packages[@]}"; do
|
| 44 |
- failedLint=$(golint "$p") |
|
| 44 |
+ # Run golint on package/*.go file explicitly to validate all go files |
|
| 45 |
+ # and not just the ones for the current platform. |
|
| 46 |
+ failedLint=$(golint "$p"/*.go) |
|
| 45 | 47 |
if [ "$failedLint" ]; then |
| 46 | 48 |
errors+=( "$failedLint" ) |
| 47 | 49 |
fi |