Versions in this module Expand all Collapse all v1 v1.4.0 Jun 25, 2023 v1.3.0 Jun 24, 2023 v1.2.0 Jun 20, 2023 v1.1.2 Jun 29, 2023 v1.1.0 Jun 20, 2023 v1.0.0 Jul 13, 2023 Changes in this version + const OutFormatCheckstyle + const OutFormatCodeClimate + const OutFormatColoredLineNumber + const OutFormatColoredTab + const OutFormatGithubActions + const OutFormatHTML + const OutFormatJSON + const OutFormatJunitXML + const OutFormatLineNumber + const OutFormatTab + const OutFormatTeamCity + var DefaultExcludePatterns = []ExcludePattern + var OutFormats = []string + func DetectGoVersion() string + func GetDefaultExcludePatternsStrings() []string + func IsGreaterThanOrEqualGo118(v string) bool + type AsasalintSettings struct + Exclude []string + IgnoreTest bool + UseBuiltinExclusions bool + type BaseRule struct + Linters []string + Path string + PathExcept string + Source string + Text string + func (b *BaseRule) Validate(minConditionsCount int) error + type BiDiChkSettings struct + FirstStrongIsolate bool + LeftToRightEmbedding bool + LeftToRightIsolate bool + LeftToRightOverride bool + PopDirectionalFormatting bool + PopDirectionalIsolate bool + RightToLeftEmbedding bool + RightToLeftIsolate bool + RightToLeftOverride bool + type Config struct + InternalCmdTest bool + InternalTest bool + Issues Issues + Linters Linters + LintersSettings LintersSettings + Output Output + Run Run + Severity Severity + Version Version + func NewDefault() *Config + func (c *Config) GetConfigDir() string + type CustomLinterSettings struct + Description string + OriginalURL string + Path string + type Cyclop struct + MaxComplexity int + PackageAverage float64 + SkipTests bool + type DecorderSettings struct + DecOrder []string + DisableDecNumCheck bool + DisableDecOrderCheck bool + DisableInitFuncFirstCheck bool + type DepGuardDeny struct + Desc string + Pkg string + type DepGuardList struct + Allow []string + Deny []DepGuardDeny + Files []string + type DepGuardSettings struct + Rules map[string]*DepGuardList + type DogsledSettings struct + MaxBlankIdentifiers int + type DupWordSettings struct + Keywords []string + type DuplSettings struct + Threshold int + type ErrChkJSONSettings struct + CheckErrorFreeEncoding bool + ReportNoExported bool + type ErrcheckSettings struct + CheckAssignToBlank bool + CheckTypeAssertions bool + DisableDefaultExclusions bool + Exclude string + ExcludeFunctions []string + Ignore string + type ErrorLintSettings struct + Asserts bool + Comparison bool + Errorf bool + ErrorfMulti bool + type ExcludePattern struct + ID string + Linter string + Pattern string + Why string + func GetExcludePatterns(include []string) []ExcludePattern + type ExcludeRule struct + func (e *ExcludeRule) Validate() error + type ExhaustiveSettings struct + Check []string + CheckGenerated bool + DefaultSignifiesExhaustive bool + ExplicitExhaustiveMap bool + ExplicitExhaustiveSwitch bool + IgnoreEnumMembers string + IgnoreEnumTypes string + PackageScopeOnly bool + type ExhaustiveStructSettings struct + StructPatterns []string + type ExhaustructSettings struct + Exclude []string + Include []string + type FileReader struct + func NewFileReader(toCfg, commandLineCfg *Config, log logutils.Log) *FileReader + func (r *FileReader) Read() error + type ForbidigoPattern struct + Msg string + Package string + Pattern string + func (p *ForbidigoPattern) MarshalString() ([]byte, error) + func (p *ForbidigoPattern) UnmarshalText(text []byte) error + type ForbidigoSettings struct + AnalyzeTypes bool + ExcludeGodocExamples bool + Forbid []ForbidigoPattern + type FunlenSettings struct + Lines int + Statements int + type GciSettings struct + CustomOrder bool + LocalPrefixes string + Sections []string + SkipGenerated bool + type GinkgoLinterSettings struct + AllowHaveLenZero bool + SuppressAsyncAssertion bool + SuppressCompareAssertion bool + SuppressErrAssertion bool + SuppressLenAssertion bool + SuppressNilAssertion bool + type GoConstSettings struct + IgnoreCalls bool + IgnoreTests bool + MatchWithConstants bool + MinOccurrencesCount int + MinStringLen int + NumberMax int + NumberMin int + ParseNumbers bool + type GoCriticCheckSettings map[string]any + type GoCriticSettings struct + DisabledChecks []string + DisabledTags []string + EnabledChecks []string + EnabledTags []string + Go string + SettingsPerCheck map[string]GoCriticCheckSettings + type GoCycloSettings struct + MinComplexity int + type GoFmtRewriteRule struct + Pattern string + Replacement string + type GoFmtSettings struct + RewriteRules []GoFmtRewriteRule + Simplify bool + type GoHeaderSettings struct + Template string + TemplatePath string + Values map[string]map[string]string + type GoImportsSettings struct + LocalPrefixes string + type GoLintSettings struct + MinConfidence float64 + type GoMndSettings struct + Checks []string + IgnoredFiles []string + IgnoredFunctions []string + IgnoredNumbers []string + Settings map[string]map[string]any + type GoModDirectivesSettings struct + ExcludeForbidden bool + ReplaceAllowList []string + ReplaceLocal bool + RetractAllowNoExplanation bool + type GoModGuardSettings struct + Allowed struct{ ... } + Blocked struct{ ... } + type GoSecSettings struct + Concurrency int + Confidence string + Config map[string]any + ExcludeGenerated bool + Excludes []string + Includes []string + Severity string + type GocognitSettings struct + MinComplexity int + type GodotSettings struct + Capital bool + CheckAll bool + Exclude []string + Period bool + Scope string + type GodoxSettings struct + Keywords []string + type GofumptSettings struct + ExtraRules bool + LangVersion string + ModulePath string + type GosmopolitanSettings struct + AllowTimeLocal bool + EscapeHatches []string + IgnoreTests bool + WatchForScripts []string + type GovetSettings struct + CheckShadowing bool + Disable []string + DisableAll bool + Enable []string + EnableAll bool + Go string + Settings map[string]map[string]any + func (cfg *GovetSettings) Validate() error + type GrouperSettings struct + ConstRequireGrouping bool + ConstRequireSingleConst bool + ImportRequireGrouping bool + ImportRequireSingleImport bool + TypeRequireGrouping bool + TypeRequireSingleType bool + VarRequireGrouping bool + VarRequireSingleVar bool + type IfshortSettings struct + MaxDeclChars int + MaxDeclLines int + type ImportAsAlias struct + Alias string + Pkg string + type ImportAsSettings struct + Alias []ImportAsAlias + NoExtraAliases bool + NoUnaliased bool + type InterfaceBloatSettings struct + Max int + type IreturnSettings struct + Allow []string + Reject []string + type Issues struct + Diff bool + DiffFromRevision string + DiffPatchFilePath string + ExcludeCaseSensitive bool + ExcludePatterns []string + ExcludeRules []ExcludeRule + IncludeDefaultExcludes []string + MaxIssuesPerLinter int + MaxSameIssues int + NeedFix bool + UseDefaultExcludes bool + WholeFiles bool + type Linters struct + Disable []string + DisableAll bool + Enable []string + EnableAll bool + Fast bool + Presets []string + type LintersSettings struct + Asasalint AsasalintSettings + BiDiChk BiDiChkSettings + Custom map[string]CustomLinterSettings + Cyclop Cyclop + Decorder DecorderSettings + Depguard DepGuardSettings + Dogsled DogsledSettings + DupWord DupWordSettings + Dupl DuplSettings + ErrChkJSON ErrChkJSONSettings + Errcheck ErrcheckSettings + ErrorLint ErrorLintSettings + Exhaustive ExhaustiveSettings + ExhaustiveStruct ExhaustiveStructSettings + Exhaustruct ExhaustructSettings + Forbidigo ForbidigoSettings + Funlen FunlenSettings + Gci GciSettings + GinkgoLinter GinkgoLinterSettings + GoModDirectives GoModDirectivesSettings + Gocognit GocognitSettings + Goconst GoConstSettings + Gocritic GoCriticSettings + Gocyclo GoCycloSettings + Godot GodotSettings + Godox GodoxSettings + Gofmt GoFmtSettings + Gofumpt GofumptSettings + Goheader GoHeaderSettings + Goimports GoImportsSettings + Golint GoLintSettings + Gomnd GoMndSettings + Gomodguard GoModGuardSettings + Gosec GoSecSettings + Gosimple StaticCheckSettings + Gosmopolitan GosmopolitanSettings + Govet GovetSettings + Grouper GrouperSettings + Ifshort IfshortSettings + ImportAs ImportAsSettings + InterfaceBloat InterfaceBloatSettings + Ireturn IreturnSettings + Lll LllSettings + LoggerCheck LoggerCheckSettings + MaintIdx MaintIdxSettings + Makezero MakezeroSettings + Maligned MalignedSettings + Misspell MisspellSettings + MustTag MustTagSettings + Nakedret NakedretSettings + Nestif NestifSettings + NilNil NilNilSettings + Nlreturn NlreturnSettings + NoLintLint NoLintLintSettings + NoNamedReturns NoNamedReturnsSettings + ParallelTest ParallelTestSettings + Prealloc PreallocSettings + Predeclared PredeclaredSettings + Promlinter PromlinterSettings + Reassign ReassignSettings + Revive ReviveSettings + RowsErrCheck RowsErrCheckSettings + Staticcheck StaticCheckSettings + Structcheck StructCheckSettings + Stylecheck StaticCheckSettings + TagAlign TagAlignSettings + Tagliatelle TagliatelleSettings + Tenv TenvSettings + Testpackage TestpackageSettings + Thelper ThelperSettings + Unparam UnparamSettings + UseStdlibVars UseStdlibVarsSettings + Varcheck VarCheckSettings + Varnamelen VarnamelenSettings + WSL WSLSettings + Whitespace WhitespaceSettings + Wrapcheck WrapcheckSettings + type LllSettings struct + LineLength int + TabWidth int + type LoggerCheckSettings struct + Kitlog bool + Klog bool + Logr bool + NoPrintfLike bool + RequireStringKey bool + Rules []string + Zap bool + type MaintIdxSettings struct + Under int + type MakezeroSettings struct + Always bool + type MalignedSettings struct + SuggestNewOrder bool + type MisspellSettings struct + IgnoreWords []string + Locale string + type MustTagSettings struct + Functions []struct{ ... } + type NakedretSettings struct + MaxFuncLines int + type NestifSettings struct + MinComplexity int + type NilNilSettings struct + CheckedTypes []string + type NlreturnSettings struct + BlockSize int + type NoLintLintSettings struct + AllowNoExplanation []string + AllowUnused bool + RequireExplanation bool + RequireSpecific bool + type NoNamedReturnsSettings struct + ReportErrorInDefer bool + type Output struct + Color string + Format string + PathPrefix string + PrintIssuedLine bool + PrintLinterName bool + PrintWelcomeMessage bool + SortResults bool + UniqByLine bool + type ParallelTestSettings struct + IgnoreMissing bool + type PreallocSettings struct + ForLoops bool + RangeLoops bool + Simple bool + type PredeclaredSettings struct + Ignore string + Qualified bool + type PromlinterSettings struct + DisabledLinters []string + Strict bool + type ReassignSettings struct + Patterns []string + type ReviveSettings struct + Confidence float64 + Directives []struct{ ... } + EnableAllRules bool + ErrorCode int + IgnoreGeneratedHeader bool + MaxOpenFiles int + Rules []struct{ ... } + Severity string + WarningCode int + type RowsErrCheckSettings struct + Packages []string + type Run struct + AllowParallelRunners bool + AllowSerialRunners bool + AnalyzeTests bool + Args []string + BuildTags []string + CPUProfilePath string + Concurrency int + Config string + Deadline time.Duration + ExitCodeIfIssuesFound int + Go string + IsVerbose bool + MemProfilePath string + ModulesDownloadMode string + NoConfig bool + PrintResourcesUsage bool + PrintVersion bool + Silent bool + SkipDirs []string + SkipFiles []string + Timeout time.Duration + TracePath string + UseDefaultSkipDirs bool + type Severity struct + CaseSensitive bool + Default string + Rules []SeverityRule + type SeverityRule struct + Severity string + func (s *SeverityRule) Validate() error + type StaticCheckSettings struct + Checks []string + DotImportWhitelist []string + GoVersion string + HTTPStatusCodeWhitelist []string + Initialisms []string + func (s *StaticCheckSettings) HasConfiguration() bool + type StructCheckSettings struct + CheckExportedFields bool + type TagAlignSettings struct + Align bool + Order []string + Sort bool + type TagliatelleSettings struct + Case struct{ ... } + type TenvSettings struct + All bool + type TestpackageSettings struct + AllowPackages []string + SkipRegexp string + type ThelperOptions struct + Begin *bool + First *bool + Name *bool + type ThelperSettings struct + Benchmark ThelperOptions + Fuzz ThelperOptions + TB ThelperOptions + Test ThelperOptions + type UnparamSettings struct + Algo string + CheckExported bool + type UseStdlibVarsSettings struct + ConstantKind bool + CryptoHash bool + DefaultRPCPath bool + HTTPMethod bool + HTTPStatusCode bool + OSDevNull bool + SQLIsolationLevel bool + SyslogPriority bool + TLSSignatureScheme bool + TimeLayout bool + TimeMonth bool + TimeWeekday bool + type VarCheckSettings struct + CheckExportedFields bool + type VarnamelenSettings struct + CheckReceiver bool + CheckReturn bool + CheckTypeParam bool + IgnoreChanRecvOk bool + IgnoreDecls []string + IgnoreMapIndexOk bool + IgnoreNames []string + IgnoreTypeAssertOk bool + MaxDistance int + MinNameLength int + type Version struct + Debug bool + Format string + type WSLSettings struct + AllowAssignAndAnythingCuddle bool + AllowAssignAndCallCuddle bool + AllowCuddleDeclaration bool + AllowCuddleWithCalls []string + AllowCuddleWithRHS []string + AllowMultiLineAssignCuddle bool + AllowSeparatedLeadingComment bool + AllowTrailingComment bool + ErrorVariableNames []string + ForceCaseTrailingWhitespaceLimit int + ForceCuddleErrCheckAndAssign bool + ForceExclusiveShortDeclarations bool + StrictAppend bool + type WhitespaceSettings struct + MultiFunc bool + MultiIf bool + type WrapcheckSettings struct + IgnoreInterfaceRegexps []string + IgnorePackageGlobs []string + IgnoreSigRegexps []string + IgnoreSigs []string