Unused

A command line tool to identify unused code.

Version

v0.8.0.0, Exuberant Ctags 5.9

Runtime

Debian Jessie

Supported Languages

C C++ C# Go HTML Java JavaScript Objective-C PHP Python Ruby Shell

Official Documentation

https://unused.codes/

YAML Configuration

unused:

  • input:

    Patterns to include in execution and reports.

  • ignore:

    Patterns to exclude from execution and reports.

  • auto-fix:

    N/A

  • config-file:

    N/A

  • machine:

    • cpu:

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

  • options:

    Below is the list of options that are supported:

    -s,--single-occurrence   Display only single occurrences
    -l,--likelihood ARG      [Allows multiple] [Allowed: high, medium, low]
                             Display results based on likelihood
    -a,--all-likelihoods     Display all likelihoods
    --ignore PATH            [Allows multiple] Ignore paths that contain PATH
  • thresholds:

    • num-issues:

      In addition to general severity levels, the following tool specific severity levels can be specified:

      • High (equivalent to general severity level error)
      • Medium (equivalent to general severity level warning)
      • Low (equivalent to general severity level info)
      • Unknown (equivalent to general severity level info)
      • NotCalculated (equivalent to general severity level info)
  • experimental:

    • incremental:

      true/false

      Note: The incremental analysis is disabled if any kinds of configuration files are changed. The files recognized as configuration files are as follows:

      • Configuration files:
        • .unused.yml at the repository root

YAML Examples

  • With default options:

    inspecode:
      unused: default
  • With custom machine:

    inspecode:
      unused:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
  • With custom options:

    inspecode:
      unused:
        options: [--single-occurrence, --all-likelihoods]

results matching ""

    No results matching ""