We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46aee69 commit 6282dc0Copy full SHA for 6282dc0
.travis.yml
@@ -9,5 +9,9 @@ git:
9
depth: 1
10
go_import_path: github.com/Clusterlab/ha_cluster_exporter
11
12
-script:
13
- - make
+jobs:
+ include:
14
+ - stage: Go fmt
15
+ - script: ./go_lint.sh
16
+ - stage: Build
17
+ - script: make
go_lint.sh
@@ -0,0 +1,11 @@
1
+#!/bin/bash
2
+
3
+# NOTE: This script needs be run from the root of the GD2 repository
4
5
+# Find all Go source files in the repository, that are not vendored or generated
6
+# and then run gofmt on them
7
+GOFMT_FILE_LIST=$(gofmt -l . | grep -v vendor)
8
+if [ -n "${GOFMT_FILE_LIST}" ]; then
+ printf >&2 'gofmt failed for the following files:\n%s\n\nplease run "gofmt -w ." on your changes before committing.\n' "${GOFMT_FILE_LIST}"
+ exit 1
+fi
0 commit comments