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

     1  package config
     2  
     3  const (
     4  	OutFormatJSON              = "json"
     5  	OutFormatLineNumber        = "line-number"
     6  	OutFormatColoredLineNumber = "colored-line-number"
     7  	OutFormatTab               = "tab"
     8  	OutFormatColoredTab        = "colored-tab"
     9  	OutFormatCheckstyle        = "checkstyle"
    10  	OutFormatCodeClimate       = "code-climate"
    11  	OutFormatHTML              = "html"
    12  	OutFormatJunitXML          = "junit-xml"
    13  	OutFormatGithubActions     = "github-actions"
    14  	OutFormatTeamCity          = "teamcity"
    15  )
    16  
    17  var OutFormats = []string{
    18  	OutFormatColoredLineNumber,
    19  	OutFormatLineNumber,
    20  	OutFormatJSON,
    21  	OutFormatTab,
    22  	OutFormatCheckstyle,
    23  	OutFormatCodeClimate,
    24  	OutFormatHTML,
    25  	OutFormatJunitXML,
    26  	OutFormatGithubActions,
    27  	OutFormatTeamCity,
    28  }
    29  
    30  type Output struct {
    31  	Format              string
    32  	PrintIssuedLine     bool   `mapstructure:"print-issued-lines"`
    33  	PrintLinterName     bool   `mapstructure:"print-linter-name"`
    34  	UniqByLine          bool   `mapstructure:"uniq-by-line"`
    35  	SortResults         bool   `mapstructure:"sort-results"`
    36  	PrintWelcomeMessage bool   `mapstructure:"print-welcome"`
    37  	PathPrefix          string `mapstructure:"path-prefix"`
    38  
    39  	// only work with CLI flags because the setup of logs is done before the config file parsing.
    40  	Color string
    41  }