mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	Rename scripts to build and add revive command as a new build tool command (#10942)
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
		
							
								
								
									
										31
									
								
								vendor/github.com/mgechev/revive/lint/rule.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								vendor/github.com/mgechev/revive/lint/rule.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
			
		||||
package lint
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"go/token"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// DisabledInterval contains a single disabled interval and the associated rule name.
 | 
			
		||||
type DisabledInterval struct {
 | 
			
		||||
	From     token.Position
 | 
			
		||||
	To       token.Position
 | 
			
		||||
	RuleName string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Rule defines an abstract rule interaface
 | 
			
		||||
type Rule interface {
 | 
			
		||||
	Name() string
 | 
			
		||||
	Apply(*File, Arguments) []Failure
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AbstractRule defines an abstract rule.
 | 
			
		||||
type AbstractRule struct {
 | 
			
		||||
	Failures []Failure
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ToFailurePosition returns the failure position.
 | 
			
		||||
func ToFailurePosition(start token.Pos, end token.Pos, file *File) FailurePosition {
 | 
			
		||||
	return FailurePosition{
 | 
			
		||||
		Start: file.ToPosition(start),
 | 
			
		||||
		End:   file.ToPosition(end),
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user