Skip to content

Fix compiler warnings: prefixes unused variables, removes unused aliases, removes unused imports

License

Notifications You must be signed in to change notification settings

noizu-labs/ex_fixer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fixer

Fix compiler warnings automatically:

  • Prefix unused variables
  • Remove unused aliases
  • Remove unused imports

Fixer

Installation

Add the following lines to deps() in mix.exs:

    {:ex_fixer, "~> 1.0.0", only: :dev}

Usage

mix fix

Options

--force

Ignore uncommitted changes. Apply changes directly to uncommitted files.

mix fix --force

--dry-run [--output-file] [--input-file]

Run without applying changes, while outputting a replay file that may be edited or reviewed prior to running.

  mix fix --dry-run --output-file fix.run
  mix fix --dry-run --input-file fix.run
  mix fix --only vars --input-file fix.run

--only [vars,imports,aliases]

Apply subset of fixes.

--exclude "a/**,b*/c

Ignore files matching any of the listed globs. You must wrap glob list inside of quotes as we do not currently support parsing an array of files.

--include "glob,glob"

Ignore files matching any of the comma separated globs.

--exclude "glob,glob"

Ignore files matching any of the comma separated globs.

--input-file file

Run input list of fixes from file (generated by dry-run)

--output-file file

Output fix set file. Can be used in conjunction with --dry-run to review changes before applying.

About

Fix compiler warnings: prefixes unused variables, removes unused aliases, removes unused imports

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 100.0%