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

Improve the comments on various types #247

Merged
merged 3 commits into from
Jun 23, 2024
Merged

Improve the comments on various types #247

merged 3 commits into from
Jun 23, 2024

Conversation

iwahbe
Copy link
Member

@iwahbe iwahbe commented Jun 21, 2024

I'm trying for a more unified and higher quality documentation story, with the eventual goal to merge 👇, mandating comments on all exported functions.

 .golangci.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.golangci.yaml b/.golangci.yaml
index b55ac7c..f75ffbd 100644
--- a/.golangci.yaml
+++ b/.golangci.yaml
@@ -3,6 +3,7 @@ run:
 issues:
   # Enable checking the by default skipped "examples" dirs
   exclude-dirs-use-default: false
+  exclude-use-default: false
   exclude-dirs:
     - vendor$
     - third_party$
@@ -28,4 +29,5 @@ linters:
     - staticcheck
     - stylecheck
     - unused
+    - godot
   disable:

@iwahbe iwahbe requested review from thomas11 and a team June 21, 2024 17:22
@iwahbe iwahbe self-assigned this Jun 21, 2024
@iwahbe iwahbe force-pushed the iwahbe/improve-comments branch 2 times, most recently from 41576ab to 1ad1d1e Compare June 21, 2024 17:40
Copy link
Contributor

@thomas11 thomas11 left a comment

Choose a reason for hiding this comment

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

Nice! The enforced period at the end of every internal comment seems a bit overzealous but not a big deal.

The only thing I noticed is that you occasionally used Markdown backticks to surround code. Can/should we do standardize this and do it always or never?

@iwahbe iwahbe force-pushed the iwahbe/improve-comments branch from 1ad1d1e to 321a33b Compare June 23, 2024 01:28
@iwahbe iwahbe force-pushed the iwahbe/improve-comments branch from 321a33b to 5312837 Compare June 23, 2024 16:22
@iwahbe
Copy link
Member Author

iwahbe commented Jun 23, 2024

Nice! The enforced period at the end of every internal comment seems a bit overzealous but not a big deal.

I'm happy to leave that off for now. I have scoped the revive style lint to non-internal code. Preferably, we would scope all of these comment lints to user facing code.

The only thing I noticed is that you occasionally used Markdown backticks to surround code. Can/should we do standardize this and do it always or never?

We should standardize. It seems like the go language itself doesn't use backticks, so we should do the same.

// The real built-in function returns the real part of the complex number c.
// The return value will be floating point type corresponding to the type of c.
func real(c ComplexType) FloatType

@iwahbe
Copy link
Member Author

iwahbe commented Jun 23, 2024

It looks like backticks are not even rendered by godoc:
Screenshot 2024-06-23 at 9 43 55 AM

@iwahbe iwahbe enabled auto-merge (squash) June 23, 2024 16:44
@iwahbe iwahbe merged commit fc4918d into main Jun 23, 2024
6 checks passed
@iwahbe iwahbe deleted the iwahbe/improve-comments branch June 23, 2024 16:45
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.

2 participants