Skip to content

Commit 3725576

Browse files
authored
docs,ci: check more vlib modules in the report-missing-dots-in-doc-comments job (#24928)
1 parent ae9a69b commit 3725576

69 files changed

Lines changed: 272 additions & 387 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/docs_ci.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,8 @@ jobs:
6565
- name: Build V
6666
run: make
6767
- name: Check doc comment dots for some key modules
68-
run: ./v run cmd/tools/find_doc_comments_with_no_dots.v vlib/builtin/ vlib/arrays/ vlib/flag/ vlib/bitfield/
68+
run: ./v run cmd/tools/find_doc_comments_with_no_dots.v \
69+
vlib/builtin/ vlib/arrays/ vlib/flag/ \
70+
vlib/bitfield/ vlib/term/ vlib/strings/ \
71+
vlib/rand/ vlib/compress/ vlib/clipboard/ \
72+
vlib/os

‎vlib/clipboard/clipboard_darwin.c.v‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,13 @@ pub fn (mut cb Clipboard) clear() {
4141
//#[cb->pb clearContents];
4242
}
4343

44-
// free releases all memory associated with the clipboard
45-
// instance.
44+
// free releases all memory associated with the clipboard instance.
4645
pub fn (mut cb Clipboard) free() {
4746
cb.foo = 0
4847
// nothing to free
4948
}
5049

51-
// has_ownership returns true if the contents of
52-
// the clipboard were created by this clipboard instance.
50+
// has_ownership returns true if the contents of the clipboard were created by this clipboard instance.
5351
pub fn (cb &Clipboard) has_ownership() bool {
5452
if cb.last_cb_serial == 0 {
5553
return false
@@ -66,8 +64,7 @@ pub fn (mut cb Clipboard) set_text(text string) bool {
6664
return C.darwin_set_pasteboard_text(cb.pb, text)
6765
}
6866

69-
// get_text retrieves the contents of the system clipboard
70-
// as a `string`.
67+
// get_text retrieves the contents of the system clipboard.
7168
// This is often associated with a *paste* action (`Cmd` + `V`).
7269
pub fn (mut cb Clipboard) get_text() string {
7370
cb.foo = 0

‎vlib/clipboard/clipboard_windows.c.v‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@ pub fn (cb &Clipboard) check_availability() bool {
115115
return cb.hwnd != unsafe { nil }
116116
}
117117

118-
// has_ownership returns true if the contents of
119-
// the clipboard were created by this clipboard instance.
118+
// has_ownership returns true if the contents of the clipboard were created by this clipboard instance.
120119
pub fn (cb &Clipboard) has_ownership() bool {
121120
return voidptr(C.GetClipboardOwner()) == cb.hwnd
122121
}
@@ -131,8 +130,7 @@ pub fn (mut cb Clipboard) clear() {
131130
cb.foo = 0
132131
}
133132

134-
// free releases all memory associated with the clipboard
135-
// instance.
133+
// free releases all memory associated with the clipboard instance.
136134
pub fn (mut cb Clipboard) free() {
137135
C.DestroyWindow(cb.hwnd)
138136
cb.foo = 0
@@ -180,8 +178,7 @@ pub fn (mut cb Clipboard) set_text(text string) bool {
180178
return true
181179
}
182180

183-
// get_text retrieves the contents of the system clipboard
184-
// as a `string`.
181+
// get_text retrieves the contents of the system clipboard.
185182
// This is often associated with a *paste* action (`Ctrl` + `V`).
186183
pub fn (mut cb Clipboard) get_text() string {
187184
cb.foo = 0

‎vlib/clipboard/dummy/dummy_clipboard.v‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ pub fn (mut cb Clipboard) set_text(text string) bool {
3232
return true
3333
}
3434

35-
// get_text retrieves the contents of the system clipboard
36-
// as a `string`.
35+
// get_text retrieves the contents of the system clipboard.
3736
// This is often associated with a *paste* action (`Ctrl` + `V`).
3837
pub fn (mut cb Clipboard) get_text() string {
3938
return cb.text
@@ -45,13 +44,11 @@ pub fn (mut cb Clipboard) clear() {
4544
cb.is_owner = false
4645
}
4746

48-
// free releases all memory associated with the clipboard
49-
// instance.
47+
// free releases all memory associated with the clipboard instance.
5048
pub fn (mut cb Clipboard) free() {
5149
}
5250

53-
// has_ownership returns true if the contents of
54-
// the clipboard were created by this clipboard instance.
51+
// has_ownership returns true if the contents of the clipboard were created by this clipboard instance.
5552
pub fn (cb &Clipboard) has_ownership() bool {
5653
return cb.is_owner
5754
}

‎vlib/compress/compress.c.v‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@ pub fn decompress(data []u8, flags int) ![]u8 {
5959
// to pass arbitrary data, without having to create a closure.
6060
pub type ChunkCallback = fn (chunk []u8, userdata voidptr) int
6161

62-
// decompress_with_callback decompresses an array of bytes based on the provided flags,
63-
// and a V fn callback to receive decompressed chunks, of at most 32 kilobytes each.
62+
// decompress_with_callback decompresses an array of bytes, based on the provided flags, and a V fn callback to receive decompressed chunks, of at most 32 kilobytes each.
6463
// It returns the total decompressed length, or a decompression error.
6564
// NB: this is a low level api, a high level implementation like zlib/gzip should be preferred.
6665
pub fn decompress_with_callback(data []u8, cb ChunkCallback, userdata voidptr, flags int) !u64 {

‎vlib/compress/gzip/gzip.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ pub fn validate(data []u8, params DecompressParams) !GzipHeader {
203203
return header
204204
}
205205

206-
// decompress an array of bytes using zlib and returns the decompressed bytes in a new array
206+
// decompress an array of bytes using zlib and returns the decompressed bytes in a new array.
207207
// Example: decompressed := gzip.decompress(b)!
208208
pub fn decompress(data []u8, params DecompressParams) ![]u8 {
209209
gzip_header := validate(data, params)!

‎vlib/compress/szip/szip.c.v‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub enum CompressionLevel {
6565
default_compression = C.MZ_DEFAULT_COMPRESSION
6666
}
6767

68-
// OpenMode lists the opening modes
68+
// OpenMode lists the opening modes.
6969
// .write: opens a file for reading/extracting (the file must exists).
7070
// .read_only: creates an empty file for writing.
7171
// .append: appends to an existing archive.
@@ -214,7 +214,7 @@ pub fn (mut zentry Zip) read_entry() !voidptr {
214214
return buf
215215
}
216216

217-
// read_entry_buf extracts the current zip entry into user specified buffer
217+
// read_entry_buf extracts the current zip entry into user specified buffer.
218218
pub fn (mut zentry Zip) read_entry_buf(buf voidptr, in_bsize int) !int {
219219
bsize := usize(in_bsize)
220220
res := C.zip_entry_noallocread(zentry, buf, bsize)
@@ -232,7 +232,7 @@ pub fn (mut zentry Zip) extract_entry(path string) ! {
232232
}
233233
}
234234

235-
// extract zip file to directory
235+
// extract zip file to directory.
236236
pub fn extract_zip_to_dir(file string, dir string) !bool {
237237
if C.access(&char(dir.str), 0) == -1 {
238238
return error('szip: cannot open directory for extracting, directory not exists')
@@ -241,7 +241,7 @@ pub fn extract_zip_to_dir(file string, dir string) !bool {
241241
return res == 0
242242
}
243243

244-
// zip files (full path) to zip file
244+
// zip files (full path) to zip file.
245245
pub fn zip_files(path_to_file []string, path_to_export_zip string) ! {
246246
// open or create new zip
247247
mut zip := open(path_to_export_zip, .no_compression, .write) or { panic(err) }

‎vlib/compress/zstd/zstd.c.v‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ mut:
458458
ctx &C.ZSTD_CCtx
459459
}
460460

461-
// new_cctx create a compression context
461+
// new_cctx create a compression context.
462462
// extra compression parameters can be set by `params`
463463
pub fn new_cctx(params CompressParams) !&CCtx {
464464
mut ctx := C.ZSTD_createCCtx()
@@ -492,7 +492,7 @@ pub fn (mut c CCtx) compress_stream2(output &OutBuffer, input &InBuffer, mode En
492492
return res
493493
}
494494

495-
// free_cctx free a compression context
495+
// free_cctx free a compression context.
496496
pub fn (mut c CCtx) free_cctx() usize {
497497
return C.ZSTD_freeCCtx(c.ctx)
498498
}
@@ -506,7 +506,7 @@ mut:
506506
ctx &C.ZSTD_DCtx
507507
}
508508

509-
// new_dctx creates a decompression context
509+
// new_dctx creates a decompression context.
510510
// extra decompression parameters can be set by `params`
511511
pub fn new_dctx(params DecompressParams) !&DCtx {
512512
mut ctx := C.ZSTD_createDCtx()

‎vlib/os/debugger_darwin.c.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module os
55

66
fn C.ptrace(int, u32, voidptr, int) int
77

8-
// debugger_present returns a bool indicating if the process is being debugged
8+
// debugger_present returns a bool indicating if the process is being debugged.
99
pub fn debugger_present() bool {
1010
$if macos {
1111
// check if a child process could trace its parent process,

‎vlib/os/debugger_freebsd.c.v‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module os
44

55
fn C.ptrace(int, u32, voidptr, int) int
66

7-
// debugger_present returns a bool indicating if the process is being debugged
7+
// debugger_present returns a bool indicating if the process is being debugged.
88
pub fn debugger_present() bool {
99
$if freebsd {
1010
// check if a child process could trace its parent process,

0 commit comments

Comments
 (0)