Skip to content

Commit b6218b1

Browse files
committed
[FAB-12440] disable goimports in linting
The upstream x/tools repo merged changes to goimports as "improvements" that are incompatible with existing code in fabric. Since we pull and build the tools from master on every build, we get what we get. Disable goimports. Change-Id: I4b5bcaf5befe4e3f4f40f393d8d4e363890ed2b4 Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
1 parent 82d9058 commit b6218b1

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

scripts/golinter.sh

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,17 @@ if [ -n "$OUTPUT" ]; then
2323
exit 1
2424
fi
2525

26-
echo "Checking with goimports"
27-
OUTPUT="$(goimports -l ${source_dirs} | grep -Ev '(^|/)testdata/' || true)"
28-
if [ -n "$OUTPUT" ]; then
29-
echo "The following files contain goimports errors"
30-
echo $OUTPUT
31-
echo "The goimports command 'goimports -l -w' must be run for these files"
32-
exit 1
33-
fi
26+
# https://github.com/golang/tools/commit/12a7c317e894c0a622b5ed27f0a102fcdd56d1ad
27+
# breaks import grouping.
28+
#
29+
# echo "Checking with goimports"
30+
# OUTPUT="$(goimports -l ${source_dirs} | grep -Ev '(^|/)testdata/' || true)"
31+
# if [ -n "$OUTPUT" ]; then
32+
# echo "The following files contain goimports errors"
33+
# echo $OUTPUT
34+
# echo "The goimports command 'goimports -l -w' must be run for these files"
35+
# exit 1
36+
# fi
3437

3538
# Now that context is part of the standard library, we should use it
3639
# consistently. The only place where the legacy golang.org version should be
@@ -51,4 +54,4 @@ if [ -n "$OUTPUT" ]; then
5154
echo "The following files contain go vet errors"
5255
echo $OUTPUT
5356
exit 1
54-
fi
57+
fi

0 commit comments

Comments
 (0)