https://github.com/leighmcculloch/gocheckcompilerdirectives
Check that go directories (//go: comments) are good.
https://github.com/leighmcculloch/gocheckcompilerdirectives
Last synced: 23 days ago
JSON representation
Check that go directories (//go: comments) are good.
- Host: GitHub
- URL: https://github.com/leighmcculloch/gocheckcompilerdirectives
- Owner: leighmcculloch
- License: mit
- Created: 2023-01-05T07:41:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-22T17:02:42.000Z (over 2 years ago)
- Last Synced: 2024-10-11T15:41:31.633Z (8 months ago)
- Language: Go
- Size: 18.6 KB
- Stars: 5
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# gocheckcompilerdirectives
Check that go compiler directives (`//go:` comments) are valid and catch easy
mistakes.Compiler directives are comments like `//go:generate`, `//go:embed`,
`//go:build`, etc.## Why
Go compiler directives are comments in the form of `//go:` that provide an
instruction to the compiler.The directives are easy to make mistakes with. The linter will detect the
following mistakes:1. Adding a space in between the comment bars and the first character, e.g. `//
go:`, will cause the compiler to silently ignore the comment.2. Mistyping a directives name, e.g. `//go:embod`, will cause the compiler to silently ignore the comment.
## Install
```
go install 4d63.com/gocheckcompilerdirectives@latest
```## Usage
```
gocheckcompilerdirectives [package]
``````
gocheckcompilerdirectives ./...
```