Liking cljdoc? Tell your friends :D

eastwood.lint


-mainclj

(-main)
(-main & opts)
source

all-lintersclj

source

counted-summaryclj

(counted-summary summary)
source

debug-namespaces-to-be-reportedclj

(debug-namespaces-to-be-reported reporter namespaces)
source

default-builtin-config-filesclj

source

default-lintersclj

source

default-optsclj

source

eastwoodclj

(eastwood opts)
(eastwood {:keys [rethrow-exceptions?] :as opts} reporter)
source

eastwood-coreclj

(eastwood-core reporter
               opts
               cwd
               {:keys [namespaces dirs files file-map non-clojure-files]
                :as effective-namespaces}
               linters)

Lint a sequence of namespaces using a specified collection of linters.

Prerequisites:

  • eastwood.lint namespace is in your classpath
  • TBD: Eastwood resources directory is in your classpath
  • eastwood.lint namespace and its dependencies have been loaded.

Arguments:

  • TBD: to be documented

Side effects:

  • Reads source files, analyzes them, generates Clojure forms from analysis results, and eval's those forms (which if there are bugs in tools.analyzer or tools.analyzer.jvm, may not be identical to the original forms read. If require'ing your source files launches the missiles, so will this.
  • Does create-ns on all namespaces specified, even if an exception during linting causes this function to return before reading all of them. See the code for why.
  • Should not print output to any output files/streams/etc., unless this occurs due to eval'ing the code being linted.

Return value:

  • TBD
Lint a sequence of namespaces using a specified collection of linters.

Prerequisites:
+ eastwood.lint namespace is in your classpath
+ TBD: Eastwood resources directory is in your classpath
+ eastwood.lint namespace and its dependencies have been loaded.

Arguments:
+ TBD: to be documented

Side effects:
+ Reads source files, analyzes them, generates Clojure forms from
  analysis results, and eval's those forms (which if there are bugs in
  tools.analyzer or tools.analyzer.jvm, may not be identical to the
  original forms read.  If require'ing your source files launches the
  missiles, so will this.
+ Does create-ns on all namespaces specified, even if an exception
  during linting causes this function to return before reading all of
  them.  See the code for why.
+ Should not print output to any output files/streams/etc., unless
  this occurs due to eval'ing the code being linted.

Return value:
+ TBD
sourceraw docstring

eastwood-from-cmdlineclj

(eastwood-from-cmdline opts)
source

effective-lintersclj

(effective-linters {:keys [linters exclude-linters add-linters
                           disable-linter-name-checks]}
                   linter-name->info
                   default-linters)
source

effective-namespacesclj

(effective-namespaces exclude-namespaces
                      namespaces
                      {:keys [source-paths test-paths]}
                      modified-since)
source

expand-ns-keywordsclj

(expand-ns-keywords expanded-namespaces namespaces)

Expand any keyword in namespaces with values from expanded-namespaces

Expand any keyword in `namespaces` with values from `expanded-namespaces`
sourceraw docstring

filename-namespace-mismatchesclj

(filename-namespace-mismatches dir-name-strs)
source

filename-to-nsclj

(filename-to-ns fname)
source

inspclj

(insp nssym)

Read, analyze, and eval a file specified by namespace as a symbol, e.g. 'testcases.f01. Return a value that has been 'cleaned up', by removing some keys from ASTs, so that it is more convenient to call clojure.inspector/inspect-tree on it. Example in REPL:

(require '[eastwood.lint :as l] '[clojure.inspector :as i]) (i/inspect-tree (l/insp 'testcases.f01))

Read, analyze, and eval a file specified by namespace as a symbol,
e.g. 'testcases.f01.  Return a value that has been 'cleaned up', by
removing some keys from ASTs, so that it is more convenient to call
clojure.inspector/inspect-tree on it.  Example in REPL:

(require '[eastwood.lint :as l] '[clojure.inspector :as i])
(i/inspect-tree (l/insp 'testcases.f01))
sourceraw docstring

last-options-map-adjustmentsclj

(last-options-map-adjustments opts reporter)
source

lintclj

(lint opts)
(lint opts reporter)

Invoke Eastwood from REPL or other Clojure code, and return a map containing these keys:

:warnings - a sequence of maps representing individual warnings. The warning map contents are documented below.

:err - nil if there were no exceptions thrown or other errors that stopped linting before it completed. A keyword identifying a kind of error if there was. See the source file src/eastwood/lint.clj inside Eastwood for defmethod's of error-msg. Each is specialized on a keyword value that is one possible value the :err key can take. The body of each method shows how Eastwood shows to the user each kind of error when it is invoked from the command line via Leiningen, serves as a kind of documentation for what the value of the :err-data key contains.

:err-data - Some data describing the error if :err's value is not nil. See :err above for where to find out more about its contents.

:versions - A nested map with its own keys containing information about JVM, Clojure, and Eastwood versions.

Keys in a warning map:

:uri-or-file-name - string containing file name where warning occurs, relative to :cwd directory of options map, if it is a file inside of that directory, or a URI object, e.g. "cases/testcases/f02.clj"

:line - line number in file for warning, e.g. 20. The first line in the file is 1, not 0. Note: In some cases this key may not be present, or the value may be nil. This is an area where Eastwood will probably improve in the future, but best to handle it for now, perhaps by replacing it with line 1 as a placeholder.

:column - column number in file for warning, e.g. 42. The first character of each line is column 1, not 0. Same comments apply for :column as for :line.

:linter - keyword identifying the linter, e.g. :def-in-def

:msg - string describing the warning message, e.g. "There is a def of i-am-inner-defonce-sym nested inside def i-am-outer-defonce-sym"

:uri - object with class URI of the file, or a URI within a JAR file, e.g. #<URI file:/Users/jafinger/clj/eastwood/0.2.0/eastwood/cases/testcases/f02.clj>

:namespace-sym - symbol containing namespace, e.g. testcases.f02,

:file - string containing resource name, relative to some unspecified path in the Java classpath, e.g. "testcases/f02.clj"

Invoke Eastwood from REPL or other Clojure code, and return a map
containing these keys:

  :warnings - a sequence of maps representing individual warnings.
      The warning map contents are documented below.

  :err - nil if there were no exceptions thrown or other errors that
      stopped linting before it completed.  A keyword identifying a
      kind of error if there was.  See the source file
      src/eastwood/lint.clj inside Eastwood for defmethod's of
      error-msg.  Each is specialized on a keyword value that is one
      possible value the :err key can take.  The body of each method
      shows how Eastwood shows to the user each kind of error when it
      is invoked from the command line via Leiningen, serves as a kind
      of documentation for what the value of the :err-data key
      contains.

  :err-data - Some data describing the error if :err's value is not
      nil.  See :err above for where to find out more about its
      contents.

  :versions - A nested map with its own keys containing information
      about JVM, Clojure, and Eastwood versions.

Keys in a warning map:

  :uri-or-file-name - string containing file name where warning
      occurs, relative to :cwd directory of options map, if it is a
      file inside of that directory, or a URI object,
      e.g. "cases/testcases/f02.clj"

  :line - line number in file for warning, e.g. 20.  The first line in
      the file is 1, not 0.  Note: In some cases this key may not be
      present, or the value may be nil.  This is an area where
      Eastwood will probably improve in the future, but best to handle
      it for now, perhaps by replacing it with line 1 as a
      placeholder.

  :column - column number in file for warning, e.g. 42.  The first
      character of each line is column 1, not 0.  Same comments apply
      for :column as for :line.

  :linter - keyword identifying the linter, e.g. :def-in-def

  :msg - string describing the warning message, e.g. "There is a def
      of i-am-inner-defonce-sym nested inside def
      i-am-outer-defonce-sym"

  :uri - object with class URI of the file, *or* a URI within a JAR
       file, e.g.  #<URI file:/Users/jafinger/clj/eastwood/0.2.0/eastwood/cases/testcases/f02.clj>

  :namespace-sym - symbol containing namespace, e.g. testcases.f02,

  :file - string containing resource name, relative to some
      unspecified path in the Java classpath,
      e.g. "testcases/f02.clj"
sourceraw docstring

lint-namespacescljmultimethod

source

lint-nsclj

(lint-ns ns-sym linters opts)
source

lint-ns*clj

(lint-ns* ns-sym analyze-results opts linter)
source

linter-infoclj

source

linter-name->infoclj

source

linter-seq->setclj

(linter-seq->set linter-seq)
source

make-reportclj

(make-report reporter start-time {:keys [warning-count error-count] :as result})
source

namespace-infoclj

(namespace-info ns-sym cwd-file)
source

ns-to-filename-setclj

(ns-to-filename-set namespace extensions)
source

nss-in-dirsclj

(nss-in-dirs dir-name-strs modified-since)
source

replace-linter-keywordsclj

(replace-linter-keywords linters all-linters default-linters)
source

setup-lint-pathsclj

(setup-lint-paths source-paths test-paths)

Return a map containing :source-path and :test-paths which contains the set of values in each. If both source-paths and test-paths are empty then :source-path is set to all the directories on the classpath, while :test-paths is the empty set.

Return a map containing `:source-path` and `:test-paths` which
contains the set of values in each. If both `source-paths` and `test-paths`
are empty then `:source-path` is set to all the directories on the classpath,
while `:test-paths` is the empty set.
sourceraw docstring

summaryclj

(summary results)
source

unknown-ns-keywordsclj

(unknown-ns-keywords namespaces known-ns-keywords desc)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close