diff options
author | David Benjamin <davidben@google.com> | 2023-01-29 11:56:25 -0500 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-31 19:09:38 +0000 |
commit | 54b04fdc21d540a6e24f9ddb7ddc3e583518e24f (patch) | |
tree | f73a64ca327485bc6675c75c4bfdb383eb70a5d5 /util/check_stack.go | |
parent | 741c153370f58dbf73c6680c8f37de656bc2cb3c (diff) | |
download | boringssl-54b04fdc21d540a6e24f9ddb7ddc3e583518e24f.zip boringssl-54b04fdc21d540a6e24f9ddb7ddc3e583518e24f.tar.gz boringssl-54b04fdc21d540a6e24f9ddb7ddc3e583518e24f.tar.bz2 |
Mark standalone Go scripts with go:build ignore
gopls currently litters our project with a sea of red, because it
assumes Go files are part of a package, but we have a lot of standalone
Go scripts. (If there are C files in the same directory as the script,
it gets upset about cgo. If there are multiple standalone scripts in the
same directory, it gets uspet about duplicate files.)
Per https://github.com/golang/go/issues/49657 and
https://github.com/golang/tools/blob/master/gopls/doc/settings.md#standalonetags-string,
the convention seems to be a go:build ignore tag. Newer versions of
gopls run in a "standalone" mode, so we still get all the nice LSP
features.
As part of this, I had to align the license header comments from /*
block comments */ to // line comments. Go build constraints can only be
preceded by blank lines and line comments. Block comments apparently
aren't allowed. (See https://pkg.go.dev/cmd/go#hdr-Build_constraints.)
If I leave the file unconverted, go fmt will immediately move the
comment to above the license block.
Change-Id: I47c69255522e9aae2bdb97a6e83fcc6ce0cf29d5
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/56525
Commit-Queue: Adam Langley <agl@google.com>
Reviewed-by: Adam Langley <agl@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Diffstat (limited to 'util/check_stack.go')
-rw-r--r-- | util/check_stack.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/util/check_stack.go b/util/check_stack.go index b718ea4..ad763e6 100644 --- a/util/check_stack.go +++ b/util/check_stack.go @@ -12,6 +12,8 @@ // OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN // CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +//go:build ignore + // check_stack.go checks that each of its arguments has a non-executable stack. // See https://www.airs.com/blog/archives/518 for details. package main |