File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -95,13 +95,18 @@ if [[ -n "${BUILDIFER:-}" ]]; then
9595
9696 # Check for lint issues?
9797 if [[ " ${LINT:- yes} " == " yes" ]] ; then
98+ # NOTE: buildifier defaults to --mode=fix, so these lint runs also
99+ # reformat the files. But since this is on travis, that is fine.
100+ # https://github.com/bazelbuild/buildtools/issues/453
98101 if ! find . " ${FIND_ARGS[@]} " -print | xargs buildifier --lint=warn > /dev/null 2>&1 ; then
99102 if [[ " ${FOUND_ISSUES} " != " no" ]] ; then
100103 echo " "
101104 fi
102105 echo " ERROR: BUILD/.bzl lint issue(s):"
103106 echo " "
104- find . " ${FIND_ARGS[@]} " -print | xargs buildifier --lint=warn
107+ # buildifier now exist with error if there are issues, so use `|| true`
108+ # to keep the script running.
109+ find . " ${FIND_ARGS[@]} " -print | xargs buildifier --lint=warn || true
105110 echo " "
106111 echo " Please download the latest buildifier"
107112 echo " https://github.com/bazelbuild/buildtools/releases"
You can’t perform that action at this time.
0 commit comments