build(deps): bump github.com/godoc-lint/godoc-lint from 0.10.2 to 0.11.1#6282
Conversation
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
|
To explain why I'm not merging this PR quickly: I was sick for 2 weeks, and I need to think about the option There are several elements:
I know that I cannot ask to I'm talking about convention but it's more than a convention: there is dedicated code inside Go to handle directives, and, for example, |
|
Thanks for the feedback, @ldez. I hope you feel better soon my friend, and as far as I'm concerned there's no rush to this. 🙏 I agree with you in that such metadata/decoration should be done via directives. As a documentation standpoint, it's not really nice to drop such However, I tend to think the And reagrding your point about directives, if a comment line starts with a directive, then godoclint will never see it. So, the problem is automatically solved. But in some cases the user may not be able to do that. |
|
By the way, thinking about the exclusion by If I can improve this to report the individual line, then maybe there'd be no need for adding |
I think I'm up to something here. Seems like I can improve the reported range/line, although there might be edge cases (e.g. when the entire godoc is a |
Signed-off-by: Babak K. Shandiz <babakks@github.com>
Signed-off-by: Babak K. Shandiz <babakks@github.com>
|
Done. I've just removed the Thanks for mentioning |
|
Sorry but I was thinking again about the topic, and I wonder if the approach is the best: (Note: maybe links should also be excluded by default) |
|
I get your point, but TBH I prefer to leave it to the users. Also, |
IMHO, you don't need to wait for more feedback: this is rare and very specific, so a hardcoded rule is enough, it can be extended or converted to an option later. But anyway, this option will not be a part of the golangci-lint configuration then I don't have to care too much about it. In the context of golangci-lint, we will not follow your approach. |
This PR upgrades
godoclinttov0.11.1with the following additions:Update schema/config to support the new
require-stdlib-doclinkrule. This rule is part of the extra set (not enabled by default), and is meant to enforce turning plaintext references to Go stdlib declarations into proper Doc links. It doesn't break the fast-ness of the linter (not requiring symbols from dependencies) as it uses a static dataset of Go stdlib declarations.(See Enhancement: suggest go doc links godoc-lint/godoc-lint#44)
pkg.nameorpkg.recv.nameare detected (singlepkgcases are ignored due to high chance of them being normal words, likebytesorencoding). Also, thepkgpart is always resolved to the underlying import path to avoid false positives (e.g. whenjsonactually points to something other thanencoding/jsonfrom stdlib). Other intricate details of the doc links are also covered to make the experience similar togo doctool.Minor improvements in
godoclintbehaviour.(See Turn off enforcement for public methods on private structs godoc-lint/godoc-lint#65)
godoc-lint/godoc-lint@v0.10.2...v0.11.1