todocomment

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2020 License: MIT Imports: 6 Imported by: 0

README

todocomment

Go Report Card Go test MIT License

todocomment finds TODO comment which doesn't include link to issue

example

package a

func f() { 
    // TODO: hoge <- NG
	
    // TODO: hoge 
    // nolint: todocomment
	
    // TODO: comment
    // https://github.com/test/test/issues/ 

    // comment
	
    /* TODO github issue will be created */ <- NG
	
    /*
        TODO github issue will be created
        nolint: todocomment
    */
}

// TODO is a stuct name
// nolint: todocomment
type TODO struct {
}

./a.go:4:2: todo comment must contains issue's link
./a.go:14:2: todo comment must contains issue's link

Install

% go get github.com/MakotoNaruse/todocomment/cmd/todocomment

Usage

% go vet -vettool=`which todocomment` [flag] pkgname
Flags:
      --issue s must contain issue's link (ex. https://github.com/test/test/issues/)

Example

% go vet -vettool=$(which todocomment) --issue "github.com/MakotoNaruse/todocomment/issues" ./...
% go vet -vettool=$(which todocomment) --issue "trello.com/b/aaaaa/" main.go
% go vet -vettool=$(which todocomment) --issue "issue" ./src

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "todocomment",
	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