Linter: Detect exported functions/interfaces/etc without comments
We can enable the linter rule to require adding a comment to the exported functions/constants/types/interfaces/structs. I often forget to do it.
I prepared a patch below. To apply it, we need to fill in the missing comments.
diff --git a/backend/.golangci.yml b/backend/.golangci.yml
index 0f394c35..6240b22b 100644
--- a/backend/.golangci.yml
+++ b/backend/.golangci.yml
@@ -75,7 +75,8 @@ linters-settings:
issues:
max-same-issues: 3
-
+ include:
+ - EXC0012 # EXC0012 revive: Annoying issue about not having a comment.
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
Edited by Slawek Figiel