defmacro
  • Introduction 👋
  • Work 🎖
    • Building a graph viz 🔥
    • Accidentally building mirrors🪞
    • Improving my dev workflow - Save thy memory ⚡️
    • Portfolio website
  • 💻Clojure
    • Why?
    • Rationale
    • Simple made easy ⚡️
    • Specter ⚡️
    • Style guide, quick links
  • 📥Learning Model
    • Overview
    • Discovery ⚡️
    • Organization
    • Beat the Forgetting Curve
  • 📥Papers
    • Out of the Tar Pit ⚡️
  • Archives
Powered by GitBook
On this page

Was this helpful?

  1. Clojure

Style guide, quick links

PreviousSpecter ⚡️NextOverview

Last updated 4 years ago

Was this helpful?

This is a list of all the guidelines mentioned in

I use it as a reference if something "smells" wrong and my goal overtime is to fill this with even shorter text that this in itself acts as a style guide without navigating.

integration with IntelliJ with file watcher is the linter.

Links

    • < 10

    • < 4

    • check variables directly

    • not for fn

    • f(g(x))

    • (remove #{x} [..x ..])

💻
Clojure style guide
clj-kondo
multimethod-dispatch-val-placement
oneline-short-fn
multiple-arity-order
function-length
function-positional-parameters-limit
pre-and-post-conditions
dynamic-namespace-manipulation
forward-references
declare
higher-order-functions
alter-var-binding
nil-punning
converting-sequences-to-vectors
flexible-comparison-functions
no-multiple-forms-fn-literals
complement
comp
partial
condp-vs-cond
case-vs-condcondp
set-as-predicate
inc-and-dec
pos-and-neg
list-vs-cons
sugared-java-interop
compact-metadata-notation-for-true-flags
private
access-private-var
attach-metadata-carefully
naming
ns-naming-schemas
lisp-case-ns
lisp-case
camelcase-for-protocols-records-structs-and-types
pred-with-question-mark
changing-state-fns-with-exclamation-mark
arrow-instead-of-to
earmuffs-for-dynamic-vars
dont-flag-constants
underscore-for-unused-bindings
idiomatic-names
data-structures
avoid-lists
keywords-for-hash-keys
literal-col-syntax
avoid-index-based-coll-access
keywords-as-fn-to-get-map-values
colls-as-fns
keywords-as-fns
avoid-transient-colls
avoid-java-colls
avoid-java-arrays
types--records
record-constructors
custom-record-constructors
custom-record-constructors-naming
mutation
refs
io-macro
avoid-ref-set
small-transactions
avoid-short-long-transactions-with-same-ref
agents
agents-send
agents-send-off
atoms
no-updates-within-transactions
prefer-swap-over-reset
strings
prefer-clojure-string-over-interop
exceptions
reuse-existing-exception-types
prefer-with-open-over-finally
macros
dont-write-macro-if-fn-will-do
write-macro-usage-before-writing-the-macro
break-complicated-macros
macros-as-syntactic-sugar
syntax-quoted-forms
comments
self-documenting-code
four-semicolons-for-heading-comments
three-semicolons-for-top-level-comments
two-semicolons-for-code-fragment
one-semicolon-for-margin-comments
semicolon-space
english-syntax
no-superfluous-comments
comment-upkeep
dash-underscore-reader-macro
refactor-dont-comment
comment-annotations
annotate-above
annotate-keywords
indent-annotations
sign-and-date-annotations
rare-eol-annotations
todo
fixme
optimize
hack
review
document-custom-annotations
documentation
prefer-docstrings
docstring-summary
leverage-markdown-in-docstrings
document-positional-arguments
document-references
docstring-grammar
docstring-indentation
docstring-leading-trailing-whitespace
docstring-after-fn-name
existential
be-functional
be-consistent
common-sense
testing
test-directory-structure
test-namespace-naming
test-naming
library-organization
library-coordinates
minimize-dependencies
tool-agnostic
lint-tools
CC4
Cadjak
CM