github.com/vanstinator/golangci-lint@v0.0.0-20240223191551-cc572f00d9d1/pkg/exitcodes/exitcodes.go (about)

     1  package exitcodes
     2  
     3  const (
     4  	Success = iota
     5  	IssuesFound
     6  	WarningInTest
     7  	Failure
     8  	Timeout
     9  	NoGoFiles
    10  	NoConfigFileDetected
    11  	ErrorWasLogged
    12  )
    13  
    14  type ExitError struct {
    15  	Message string
    16  	Code    int
    17  }
    18  
    19  func (e ExitError) Error() string {
    20  	return e.Message
    21  }
    22  
    23  var (
    24  	ErrNoGoFiles = &ExitError{
    25  		Message: "no go files to analyze",
    26  		Code:    NoGoFiles,
    27  	}
    28  	ErrFailure = &ExitError{
    29  		Message: "failed to analyze",
    30  		Code:    Failure,
    31  	}
    32  )