1
0
mirror of https://github.com/mgechev/revive.git synced 2025-07-01 00:24:54 +02:00

docs: improve comments for functions; enable godot (#1382)

This commit is contained in:
Oleksandr Redko
2025-05-27 08:44:24 +03:00
committed by GitHub
parent 398f7a83eb
commit f4976873e7
49 changed files with 135 additions and 132 deletions

View File

@ -1,29 +1,29 @@
package revivelib
// LintPattern indicates a pattern to be included/excluded when linting
// LintPattern indicates a pattern to be included/excluded when linting.
type LintPattern struct {
isExclude bool
pattern string
}
// IsExclude - should this pattern be included or excluded when linting
// IsExclude determines should this pattern be included or excluded when linting.
func (p *LintPattern) IsExclude() bool {
return p.isExclude
}
// GetPattern - returns the actual pattern
// GetPattern returns the actual pattern
//
// Deprecated: Use [Pattern].
func (p *LintPattern) GetPattern() string {
return p.Pattern()
}
// Pattern - returns the actual pattern
// Pattern returns the actual pattern.
func (p *LintPattern) Pattern() string {
return p.pattern
}
// Include this pattern when linting
// Include this pattern when linting.
func Include(pattern string) *LintPattern {
return &LintPattern{
isExclude: false,
@ -31,7 +31,7 @@ func Include(pattern string) *LintPattern {
}
}
// Exclude this pattern when linting
// Exclude this pattern when linting.
func Exclude(pattern string) *LintPattern {
return &LintPattern{
isExclude: true,