Skip to content

Commit

Permalink
Merge pull request #485 from opendevstack/fix/gofmt
Browse files Browse the repository at this point in the history
Run go fmt over packages, not entire directory
  • Loading branch information
michaelsauter authored Mar 29, 2022
2 parents cb22dae + d79fcfc commit 3efcb65
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ listed in the changelog.
- Change installation mode from centralized to local/namespaced ([#404](https://github.com/opendevstack/ods-pipeline/pull/404))
- Removed logging of test reports for TypeScript and Python build tasks ([#470](https://github.com/opendevstack/ods-pipeline/issues/470))
- Don't remove tasks on `helm` upgrades, rollbacks, etc. ([#477](https://github.com/opendevstack/ods-pipeline/issues/477))
- Run go fmt over packages, not entire directory ([#484](https://github.com/opendevstack/ods-pipeline/issues/484))

### Fixed
- Cannot enable debug mode in some tasks ([#377](https://github.com/opendevstack/ods-pipeline/issues/377))
Expand Down
3 changes: 2 additions & 1 deletion build/package/scripts/build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ echo GOMODCACHE="$GOMODCACHE"
df -h "$ROOT_DIR"

echo "Checking format ..."
unformatted=$(gofmt -l .)
# shellcheck disable=SC2046
unformatted=$(go fmt $(go list ./...))
if [ -n "${unformatted}" ]; then
echo "Unformatted files:"
echo "${unformatted}"
Expand Down

0 comments on commit 3efcb65

Please sign in to comment.