1
0
mirror of https://github.com/mgechev/revive.git synced 2025-01-24 03:47:45 +02:00
revive/testdata/comment-spacings.go
Shubh Karman Singh 5f26378cc2
Comment spacing rule (#761)
* added comment-spacing rule for revive

* added test for comment-spacings rule

* adds comment-spacings rule to the configuration

* renames the source file to match rule name

* adds some tests

* refactor Comment-Spacings Rule to remove whiteList and avoid Panic at empty comment

* refactoring and adds rule configuration

* adds rule documentation

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2022-10-29 19:32:42 +02:00

25 lines
513 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