Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optional arguments should not be done with Varargs #56

Open
egli opened this issue Jun 3, 2015 · 0 comments
Open

Optional arguments should not be done with Varargs #56

egli opened this issue Jun 3, 2015 · 0 comments

Comments

@egli
Copy link
Member

egli commented Jun 3, 2015

According to Stuart Sierra optional arguments shouldn't be done with varargs. His arguments make sense. There are a few places in the code where this is used and could be improved. The following is a redacted grep output with irrelevant occurrences deleted:

-*- mode: grep; default-directory: "~/src/mdr2/" -*-
Grep started at Wed Jun  3 12:07:06

find . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o -name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name \*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o -name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name \*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o -name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr -o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o -name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune -o  -type f \( -name \*.clj \) -exec grep -i -nH -e \& {} +
./src/mdr2/encode.clj:68:    :as production} & [volume]]
./src/mdr2/pipeline2/scripts.clj:10:(defn validate [input & {:keys [mathml-version check-images] :as opts}]
./src/mdr2/pipeline2/scripts.clj:13:(defn daisy3-to-epub3 [input & {:keys [mediaoverlays assert-valid] :as opts}]
./src/mdr2/pipeline2/scripts.clj:16:(defn epub3-to-daisy202 [input & {:keys [temp-dir output-dir] :as opts}]
./src/mdr2/pipeline1.clj:60:  [input output & {:keys [bitrate stereo freq] :as opts}]
./src/mdr2/views.clj:111:(defn file-upload-form [request id & [errors]]
./src/mdr2/views.clj:145:(defn catalog [request & error]
./src/mdr2/views.clj:234:(defn production-bulk-import-form [request & [errors]]
./src/mdr2/views.clj:305:  [request & [errors]]
./src/mdr2/views.clj:411:(defn production-split-form [request id & [errors]]

Grep finished (matches found) at Wed Jun  3 12:07:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant