treewide: run gofmt -s and enable linter
Change-Id: I90b8ef48c955dccfddc5bbc0a57205b7da844b60
Reviewed-on: https://review.monogon.dev/c/monogon/+/3828
Tested-by: Jenkins CI
Reviewed-by: Leopold Schabel <leo@monogon.tech>
diff --git a/build/analysis/BUILD.bazel b/build/analysis/BUILD.bazel
index b97a58e..f55a2ad 100644
--- a/build/analysis/BUILD.bazel
+++ b/build/analysis/BUILD.bazel
@@ -91,7 +91,7 @@
"//build/analysis/checkcompilerdirectives",
"//build/analysis/noioutil",
"//build/analysis/importsort",
- # "//build/analysis/gofmt", # TODO(tim): Enable when formatted
+ "//build/analysis/gofmt",
]
# NOGO_CONFIG_OVERRIDES contains the overrides for nogo to exempt specific files
@@ -213,6 +213,7 @@
"returnerrcheck",
"hash",
"errcmp",
+ "gofmt",
] + ALL_STATICCHECK_ANALYZERS
# We override the variable with itself unioned with the other
diff --git a/build/toolbase/workspace.go b/build/toolbase/workspace.go
index b8582af..f1d9f08 100644
--- a/build/toolbase/workspace.go
+++ b/build/toolbase/workspace.go
@@ -19,9 +19,9 @@
// WorkspaceDirectory returns the workspace directory from which a given
// command line tool is running. This handles the following cases:
//
-// 1. The command line tool was invoked via `bazel run`.
-// 2. The command line tool was started directly in a workspace directory (but
-// not a subdirectory).
+// 1. The command line tool was invoked via `bazel run`.
+// 2. The command line tool was started directly in a workspace directory (but
+// not a subdirectory).
//
// If the workspace directory path cannot be inferred based on the above
// assumptions, an error is returned.