mirror of
https://github.com/mgechev/revive.git
synced 2024-11-24 08:32:22 +02:00
45 lines
814 B
Go
45 lines
814 B
Go
package commentspacings
|
|
|
|
//revive:disable:cyclomatic
|
|
type some struct{}
|
|
|
|
//revive:disable:cyclomatic High complexity score but easy to understand
|
|
type some1 struct{}
|
|
|
|
// Some nice comment
|
|
//
|
|
// With an empty line in the middle will make the rule panic!
|
|
func itsATrap() {}
|
|
|
|
// This is a well formed comment
|
|
type hello struct {
|
|
random `json:random`
|
|
}
|
|
|
|
// MATCH:21 /no space between comment delimiter and comment text/
|
|
|
|
//This comment does not respect the spacing rule!
|
|
var a string
|
|
|
|
//myOwnDirective: do something
|
|
|
|
/*
|
|
Should be valid
|
|
*/
|
|
|
|
// Tabs between comment delimeter and comment text should be fine
|
|
|
|
// MATCH:34 /no space between comment delimiter and comment text/
|
|
|
|
/*Not valid
|
|
*/
|
|
|
|
/* valid
|
|
*/
|
|
|
|
/* valid
|
|
*/
|
|
|
|
//nolint:staticcheck // nolint should be in the default list of acceptable comments.
|
|
var b string
|