Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add godot linter #3613

Merged
merged 3 commits into from
Mar 21, 2024
Merged

Conversation

grobinson-grafana
Copy link
Contributor

@grobinson-grafana grobinson-grafana commented Nov 22, 2023

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

@grobinson-grafana
Copy link
Contributor Author

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

cli/silence.go Outdated Show resolved Hide resolved
cli/config.go Outdated Show resolved Hide resolved
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor request to fix a few incorrect doc comments, otherwise LGTM.

cli/cluster.go Outdated Show resolved Hide resolved
@SuperQ
Copy link
Member

SuperQ commented Dec 8, 2023

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

@grobinson-grafana grobinson-grafana force-pushed the grobinson/add-godot branch 2 times, most recently from 8ef7063 to e696e25 Compare February 19, 2024 16:48
Signed-off-by: George Robinson <[email protected]>
Signed-off-by: George Robinson <[email protected]>
@TheMeier
Copy link
Contributor

TheMeier commented Mar 9, 2024

@grobinson-grafana ping

@grobinson-grafana
Copy link
Contributor Author

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

Copy link
Member

@gotjosh gotjosh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gotjosh gotjosh merged commit 342f6a5 into prometheus:main Mar 21, 2024
11 checks passed
th0th pushed a commit to th0th/alertmanager that referenced this pull request Mar 23, 2024
* Add godot linter

Signed-off-by: George Robinson <[email protected]>

* Remove extra line from LICENSE

Signed-off-by: George Robinson <[email protected]>

---------

Signed-off-by: George Robinson <[email protected]>
Signed-off-by: Gokhan Sari <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants