Remove redundant comments.
This commit is contained in:
parent
a2c312741b
commit
ae5c8e1301
5 changed files with 2 additions and 23 deletions
|
@ -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)
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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*))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue