validirective

package module
v0.0.0-...-cc31815 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 5 Imported by: 0

README

validirective Go Reference

validirective detects directives that have been commented out by mistake.

Install

go install github.com/moromin/validirective/cmd/validirective@latest

Usage

go vet -vettool=`which validirective` <target-file>

Example

// target file
// sample.go
package sample

import _ "embed"

//go:embed sample.json
var s1 []byte

// go:embed sample.json
var s2 []byte
$ go vet -vettool=`which validirective` sample.go
# command-line-arguments
./sample.go:8:1: this directive has become a comment...

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "validirective",
	Doc:  doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Analyzer is ...

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL