From ae5c8e1301ef519dd6351149b4946cd688faf12d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pant=C5=AF=C4=8Dek?= Date: Wed, 5 Jul 2023 22:12:07 +0200 Subject: [PATCH] Remove redundant comments. --- src/util-csv.scm | 6 +----- src/util-git.scm | 6 +----- src/util-io.scm | 8 -------- src/util-list.scm | 1 - src/util-stdout.scm | 4 ---- 5 files changed, 2 insertions(+), 23 deletions(-) diff --git a/src/util-csv.scm b/src/util-csv.scm index 2a2e089..e2627c8 100644 --- a/src/util-csv.scm +++ b/src/util-csv.scm @@ -48,8 +48,6 @@ CSV loader.") util-io racket-kwargs) - ;; Curry version of line parser with configurable cell separator and - ;; string delimiter. Returns a list of lists of strings. (define/doc ((make-csv-line-parser separator string-delimiter) line) ("Curried version of fast CSV line parser with given separator and string delimiter. @@ -95,7 +93,7 @@ CSV loader.") (loop (cdr tokens) (cons (cons token (car res)) (cdr res)) 2)))))))) ; Continue inside quoted data - ;; Parses given CSV lines list + (define*/doc (csv-parse-lines lines #:separator (separator #\;) #:string-delimiter (string-delimiter #\")) @@ -114,7 +112,6 @@ CSV loader.") (cons (csv-parse-line line) res))))))) - ;; Loads given CSV file and parses its lines into lists (define/doc (csv-parse fn . args) ("Uses ```csv-parse-lines``` on lines read from given file ```fn```.") (call/cc @@ -126,7 +123,6 @@ CSV loader.") (let ((lines (read-lines/no-bom (open-input-file fn)))) (apply csv-parse-lines lines args))))))) - ;; Splits CSV into header and body based on the first empty row. (define/doc (csv-split-header csv) ("Splits given loaded CSV into two tables at the first empty row.") (let loop ((body csv) diff --git a/src/util-git.scm b/src/util-git.scm index 29009e6..2c885a3 100644 --- a/src/util-git.scm +++ b/src/util-git.scm @@ -60,7 +60,6 @@ repo args)) - ;; Curried git repo command wrapper (define*/doc (git repo (defmodesym 'output)) (" * ```repo``` - a path to repository @@ -95,7 +94,6 @@ repository returning one or two values based on ```mode``` given: '((" M" modified) ("??" untracked))) - ;; Returns a dictionary of unknown, modified, deleted and added files (define/doc (git-status repo) (" * ```repo``` - git repository @@ -125,15 +123,13 @@ Returns a dictionary with the following keys: (cons fname (ldict-ref res status '()))))))))) - ;; Returns detailed file annotation with each line being represented - ;; by dictionary with keys from git output (define/doc (git-blame repo fname) (" * ```repo``` - git repository * ```fname``` - file name (path) relative to the git repository Returns annotated source with information about originating commits -for each line. +for each line represented by dictionary with keys from git output. ") (let loop ((lines ((git repo) 'blame '--line-porcelain fname)) (blame (make-ldict)) diff --git a/src/util-io.scm b/src/util-io.scm index 64c3b0e..5bf4da9 100644 --- a/src/util-io.scm +++ b/src/util-io.scm @@ -52,8 +52,6 @@ (substring str 3) str)))) - ;; Reads lines from given input port, discarding BOM at the beginning - ;; of the first line if there is any. (define/doc (read-lines/no-bom ip) (" * ```port``` - an input port @@ -67,8 +65,6 @@ UTF-8 BOM, removes it. (cons (remove-optional-bom (car lines)) (cdr lines))))) - ;; Very simple shell command wrapper that returns lines produced by - ;; given command. (define/doc (get-process-output-lines cmd . args) (" * ```cmd``` - a string with the command @@ -87,8 +83,6 @@ running the command given. (let-values (((pid exit-ok? exit/signal) (process-wait pid))) result)))) - ;; Very simple shell command wrapper that returns lines produced by - ;; given command. (define/doc (get-process-exit+output-lines cmd . args) (" * ```cmd``` - a string with the command @@ -107,8 +101,6 @@ all the lines produced by running the command given. (let-values (((pid exit-ok? exit/signal) (process-wait pid))) (values exit/signal result))))) - ;; Invokes given command with given arguments, gives it all input - ;; lines and returns the output lines. (define/doc (process-send/recv cmd args . lines) (" * ```cmd``` - a string with command diff --git a/src/util-list.scm b/src/util-list.scm index 1090e6e..eb86c9f 100644 --- a/src/util-list.scm +++ b/src/util-list.scm @@ -42,7 +42,6 @@ most scheme implementations.") (chicken process) testing) - ;; Returns a list with elements matching pred? predicate. (define/doc (filter pred? lst) ("* ```pred?``` - procedure accepting any value and returning #t or #f * ```lst``` - list to be filtered diff --git a/src/util-stdout.scm b/src/util-stdout.scm index a391891..e4a4cf2 100644 --- a/src/util-stdout.scm +++ b/src/util-stdout.scm @@ -41,27 +41,23 @@ (chicken base) (chicken format)) - ;; If true, all stdout output is suppresed (define/doc *stdout-quiet* ("A boolean parameter which disables all output from procedures in this module if its value is ```#t```.") quiet (make-parameter #f)) - ;; Prints to stdout if not quiet (define/doc (stdout-print . args) ("If not quiet, passes ```args``` to ```print```.") (when (not (*stdout-quiet*)) (apply print args))) - ;; Prints formatted string to stdout if not quiet (define/doc (stdout-printf fmt . args) ("If not quiet, prints formatted string ```fmt``` by applying ```args``` to ```format``` procedure.") (when (not (*stdout-quiet*)) (print (apply format fmt args)))) - ;; Prints newline if not quiet (define/doc (stdout-newline) ("If not quiet, calls ```(newline)```.") (when (not (*stdout-quiet*))