CODING_STANDARDS: mention -local flag to goimports
Change-Id: I8e9fff22e067c3b2d7de5d446bc6a4e4b0840c7f
Reviewed-on: https://review.monogon.dev/c/monogon/+/690
Reviewed-by: Mateusz Zalega <mateusz@monogon.tech>
diff --git a/CODING_STANDARDS.md b/CODING_STANDARDS.md
index fce6edd..b538552 100644
--- a/CODING_STANDARDS.md
+++ b/CODING_STANDARDS.md
@@ -21,8 +21,8 @@
"example.com/some/external/thing"
"golang.org/x/crypto"
- "dev.source.monogon/some/internal/library"
- apkg "dev.source.monogon/some/other/pkg"
+ "source.monogon.dev/some/internal/library"
+ apkg "source.monogon.dev/some/other/pkg"
)
```
@@ -35,12 +35,12 @@
"errors"
"net/http"
- "dev.source.monogon/some/internal/library"
- "dev.source.monogon/some/internal/pkg"
+ "source.monogon.dev/some/internal/library"
+ "source.monogon.dev/some/internal/pkg"
- "dev.source.monogon/other/subtree/a"
- "dev.source.monogon/other/subtree/b"
- foo "dev.source.monogon/other/subtree/c"
+ "source.monogon.dev/other/subtree/a"
+ "source.monogon.dev/other/subtree/b"
+ foo "source.monogon.dev/other/subtree/c"
)
```
@@ -49,3 +49,5 @@
$ bazel build //:goimports
The resulting binary can then be copied to anywhere in the filesystem (eg. $HOME/bin/goimports-monogon) and any editor which supports gofmt/goimports integration can be pointed at this tool to automatically reformat files to the required format.
+
+When setting up integration with a text editor (or calling the binary manually), you must make it so that goimports get called `-local source.monogon.dev/`. Otherwise goimports will not correctly split away local/Monogon (`source.monogon.dev`) imports from other (global) imports.