aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorManlio Perillo <manlio.perillo@gmail.com>2023-05-08 08:56:35 +0200
committerManlio Perillo <manlio.perillo@gmail.com>2023-05-09 11:07:22 +0200
commit9de89f6d604753a97afbf739f575fcd21cbd85a3 (patch)
tree936cd467fbee5b4545c15da071d2beb33e1562db
parentdd5df9f7ccce03786793b8dae4d1e7c4800f6647 (diff)
build: fix doc-comments
Some functions and custom build steps incorrectly used a normal comment. Use a doc-comment instead. Additionally, use a present tense verb to describe the action of a function or custom build step.
-rw-r--r--build.zig18
1 files changed, 9 insertions, 9 deletions
diff --git a/build.zig b/build.zig
index c0515a3..f8ea9b7 100644
--- a/build.zig
+++ b/build.zig
@@ -568,13 +568,13 @@ const ZiglingStep = struct {
}
};
-// Clear the entire line and move the cursor to column zero.
-// Used for clearing the compiler and build_runner progress messages.
+/// Clears the entire line and move the cursor to column zero.
+/// Used for clearing the compiler and build_runner progress messages.
fn resetLine() void {
if (use_color_escapes) print("{s}", .{"\x1b[2K\r"});
}
-/// Remove trailing whitespace for each line in buf, also ensuring that there
+/// Removes trailing whitespace for each line in buf, also ensuring that there
/// are no trailing LF characters at the end.
pub fn trimLines(allocator: std.mem.Allocator, buf: []const u8) ![]const u8 {
var list = try std.ArrayList(u8).initCapacity(allocator, buf.len);
@@ -594,7 +594,7 @@ pub fn trimLines(allocator: std.mem.Allocator, buf: []const u8) ![]const u8 {
return std.mem.trimRight(u8, result, "\n");
}
-// Print a message to stderr.
+/// Prints a message to stderr.
const PrintStep = struct {
step: Step,
message: []const u8,
@@ -621,7 +621,7 @@ const PrintStep = struct {
}
};
-// Skip an exercise.
+/// Skips an exercise.
const SkipStep = struct {
step: Step,
exercise: Exercise,
@@ -650,10 +650,10 @@ const SkipStep = struct {
}
};
-// Check that each exercise number, excluding the last, forms the sequence
-// `[1, exercise.len)`.
-//
-// Additionally check that the output field lines doesn't have trailing whitespace.
+/// Checks that each exercise number, excluding the last, forms the sequence
+/// `[1, exercise.len)`.
+///
+/// Additionally check that the output field lines doesn't have trailing whitespace.
fn validate_exercises() bool {
// Don't use the "multi-object for loop" syntax, in order to avoid a syntax
// error with old Zig compilers.