alertmanager icon indicating copy to clipboard operation
alertmanager copied to clipboard

Add godot linter

Open grobinson-grafana opened this issue 2 years ago • 2 comments

Adds the godot linter to make sure all comments are captialized and end in a full stop (period).

grobinson-grafana avatar Nov 22 '23 15:11 grobinson-grafana

Good to know it works 😄

/go/bin/golangci-lint run  ./...
matchers/parse/lexer.go:254:4: Sentence should start with a capital letter (godot)
// it returns nil if the next rune is valid, otherwise an expectedError
   ^
matchers/parse/parse.go:199:44: Comment should end in a period (godot)
			// open brace has a matching close brace
			                                        ^
matchers/parse/parse.go:223:44: Comment should end in a period (godot)
			// open brace has a matching close brace
			                                        ^
nflog/nflogpb/set_test.go:29:27: Sentence should start with a capital letter (godot)
		{newSubset(), true}, // empty subset
		                        ^
nflog/nflogpb/set_test.go:57:27: Sentence should start with a capital letter (godot)
		{newSubset(), true}, // empty subset
		                        ^
pkg/labels/parse.go:140:27: Comment should end in a period (godot)
	// Unescape the rawValue:
	                         ^
make: *** [Makefile.common:173: common-lint] Error 1

grobinson-grafana avatar Nov 22 '23 15:11 grobinson-grafana

This needs a rebase. Also, would you mind squashing all the fixes into one commit?

SuperQ avatar Dec 08 '23 16:12 SuperQ

@grobinson-grafana ping

TheMeier avatar Mar 09 '24 15:03 TheMeier

@TheMeier I don't have merge permissions so I can't merge this 😞 Needs to be @gotjosh or @simonpasquier

grobinson-grafana avatar Mar 21 '24 10:03 grobinson-grafana