Source file src/cmd/vet/main.go

     1  // Copyright 2012 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package main
     6  
     7  import (
     8  	"cmd/internal/objabi"
     9  
    10  	"golang.org/x/tools/go/analysis/unitchecker"
    11  
    12  	"golang.org/x/tools/go/analysis/passes/asmdecl"
    13  	"golang.org/x/tools/go/analysis/passes/assign"
    14  	"golang.org/x/tools/go/analysis/passes/atomic"
    15  	"golang.org/x/tools/go/analysis/passes/bools"
    16  	"golang.org/x/tools/go/analysis/passes/buildtag"
    17  	"golang.org/x/tools/go/analysis/passes/cgocall"
    18  	"golang.org/x/tools/go/analysis/passes/composite"
    19  	"golang.org/x/tools/go/analysis/passes/copylock"
    20  	"golang.org/x/tools/go/analysis/passes/errorsas"
    21  	"golang.org/x/tools/go/analysis/passes/framepointer"
    22  	"golang.org/x/tools/go/analysis/passes/httpresponse"
    23  	"golang.org/x/tools/go/analysis/passes/ifaceassert"
    24  	"golang.org/x/tools/go/analysis/passes/loopclosure"
    25  	"golang.org/x/tools/go/analysis/passes/lostcancel"
    26  	"golang.org/x/tools/go/analysis/passes/nilfunc"
    27  	"golang.org/x/tools/go/analysis/passes/printf"
    28  	"golang.org/x/tools/go/analysis/passes/shift"
    29  	"golang.org/x/tools/go/analysis/passes/sigchanyzer"
    30  	"golang.org/x/tools/go/analysis/passes/stdmethods"
    31  	"golang.org/x/tools/go/analysis/passes/stringintconv"
    32  	"golang.org/x/tools/go/analysis/passes/structtag"
    33  	"golang.org/x/tools/go/analysis/passes/testinggoroutine"
    34  	"golang.org/x/tools/go/analysis/passes/tests"
    35  	"golang.org/x/tools/go/analysis/passes/unmarshal"
    36  	"golang.org/x/tools/go/analysis/passes/unreachable"
    37  	"golang.org/x/tools/go/analysis/passes/unsafeptr"
    38  	"golang.org/x/tools/go/analysis/passes/unusedresult"
    39  )
    40  
    41  func main() {
    42  	objabi.AddVersionFlag()
    43  
    44  	unitchecker.Main(
    45  		asmdecl.Analyzer,
    46  		assign.Analyzer,
    47  		atomic.Analyzer,
    48  		bools.Analyzer,
    49  		buildtag.Analyzer,
    50  		cgocall.Analyzer,
    51  		composite.Analyzer,
    52  		copylock.Analyzer,
    53  		errorsas.Analyzer,
    54  		framepointer.Analyzer,
    55  		httpresponse.Analyzer,
    56  		ifaceassert.Analyzer,
    57  		loopclosure.Analyzer,
    58  		lostcancel.Analyzer,
    59  		nilfunc.Analyzer,
    60  		printf.Analyzer,
    61  		shift.Analyzer,
    62  		sigchanyzer.Analyzer,
    63  		stdmethods.Analyzer,
    64  		stringintconv.Analyzer,
    65  		structtag.Analyzer,
    66  		tests.Analyzer,
    67  		testinggoroutine.Analyzer,
    68  		unmarshal.Analyzer,
    69  		unreachable.Analyzer,
    70  		unsafeptr.Analyzer,
    71  		unusedresult.Analyzer,
    72  	)
    73  }
    74  

View as plain text