kibit

kibit is a static code analyzer for Clojure, ClojureScript, cljx and other Clojure variants.

Version

0.1.6

Runtime

OpenJDK 8 Leiningen 2.7.1

Supported Languages

Clojure ClojureScript

Official Documentation

https://github.com/jonase/kibit

YAML Configuration

kibit:

  • input:

    Patterns to include in reports.

    Note: The input patterns are not applied when running kibit in order to follow the source paths of each Leiningen project. Therefore, some of the files excluded by the patterns may be processed and you may even see logs related to the excluded files in the job console. However, Inspecode eventually ignores any issues detected on the excluded files when generating job reports.

  • ignore:

    Patterns to exclude from reports.

    Note: Just like input:, the ignore patterns are not applied when running kibit.

  • auto-fix:

    true/false

    Specifying true implies --replace option.

    Note: As of now, kibit does not keep CRLF line endings and all EOL characters are converted to LF in files where the auto-fix is applied. We will solve this problem, but for the time being, please don't enable the auto-fix feature if you need to keep CRLF line endings.

  • config-file:

    N/A

  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.5 CPU with 1920 MiB RAM.

      Inspecode configures the maximum heap size (-Xmx) of the Java virtual machine (JVM) by applying a custom profile with :jvm-opts according to this value. Inspecode reserves 240 MiB RAM for system, and makes the rest of RAM available to JVM for heap allocation. For example, -Xmx1680m is specified by default (for 0.5 CPU), -Xmx5520m is specified for 1.5 CPU.

  • experimental:

    • incremental:

      N/A

      Note: The incremental analysis is not supported for kibit as of now due to the same reason as input:.

YAML Examples

  • With default options:

    inspecode:
      kibit: default
  • With enabling auto-fixing and default options:

    inspecode:
      kibit: auto-fix
  • With custom machine:

    inspecode:
      kibit:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM

Multiple Projects In Single Repository

If there are multiple Leiningen projects (project.clj files) in single repository, Inspecode detects them and then runs kibit for each project.

Resolving Dependencies

The dependencies are resolved in the same manner as lein test. See the lein test page for the details.

results matching ""

    No results matching ""