Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

4d63.com/gocheckcompilerdirectives

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

4d63.com/gocheckcompilerdirectives

Go
Version
v1.3.0
Version published
Created
Source

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:

  • Adding a space in between the comment bars and the first character, e.g. // go:, will cause the compiler to silently ignore the comment.

  • 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 ./...

FAQs

Package last updated on 28 Feb 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts