Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@lcheylus
Copy link
Contributor

Various improvements and fix for documentation in vlib/sync/:

  • sync: improve documentation for Semaphore functions
  • sync: improve documentation for Once functions
  • sync: improve documentation for Mutex str functions
  • sync: improve documentation for Cond functions
  • sync: improve documentation for WaitGroup

@huly-for-github
Copy link

Connected to Huly®: V_0.6-23213

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

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

Thank you, good work.

What do you think of the idea for making a dedicated tool, or adding an option to v doc, to report the . for public comments that miss them?

A potential benefit is that we could find and fix them all in one PR, then run it on the CI too, to keep the repo clean in that aspect.

@lcheylus
Copy link
Contributor Author

What do you think of the idea for making a dedicated tool, or adding an option to v doc, to report the . for public comments that miss them?

A potential benefit is that we could find and fix them all in one PR, then run it on the CI too, to keep the repo clean in that aspect.

Yes, I'm thinking to develop a specific tool/script to check functions documentation e.g. find if description ends with a final dot (+ others checks if possible).

As you said, it could be a potential benefit to check documentation in CI.

@spytheman spytheman merged commit 6b45931 into vlang:master Jun 27, 2025
78 of 79 checks passed
@lcheylus lcheylus deleted the docs-sync branch June 27, 2025 07:30
@spytheman
Copy link
Member

@lcheylus I've made cmd/tools/find_doc_comments_with_no_dots.v, and used it to find and fix some of the doc comments in builtin and arrays yesterday.

@spytheman
Copy link
Member

spytheman commented Jul 3, 2025

For v run cmd/tools/find_doc_comments_with_no_dots.v vlib/ it returns:

...
> Processed 1386 .v files, found errors: 1416 , in 9985 `pub` declarations, and 6268 pub comment lines.

i.e. it may be a bit early to add that to the CI, but I can add something like this instead:

v run cmd/tools/find_doc_comments_with_no_dots.v vlib/builtin/ vlib/arrays/ vlib/flag/ vlib/bitfield/

to keep these ones from regressing.
(for those it reports with a 0 exit code and:

> Processed 92 .v files, found errors: 0 , in 1064 `pub` declarations, and 756 pub comment lines.

)

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