View Source mix igniter.refactor.rename_function (igniter v0.3.76)

A short description of your task

Rename a given function across a whole project. This will remap definitions in addition to calls and references.

Keep in mind that it cannot detect 100% of cases, and will always miss usage of apply/3 for dynamic function calling.

If the new module is different than the old module, the function will be moved. If the new module does not exist, it will be created.

Pass an arity to the first function to only rename a specific arity definition.

Options

  • --deprecate - soft | hard The old function will remain in place but deprecated. Soft deprecations, only affect documentation, while hard deprecations will display a warning when the function is called.

Example

mix igniter.refactor.rename_function Mod.fun NewMod.new_fun

Summary

Functions

Callback implementation for Igniter.Mix.Task.igniter/2.