mix lazy_doc.clean (LazyDoc v0.5.0)

## Main functionality

The module Mix.Tasks.LazyDoc.Clean provides a task for cleaning up documentation in the codebase.

## Description

It implements functionality for removing documentation for specific functions from the abstract syntax tree (AST) of Elixir modules. The task starts the LazyDoc application, checks the application configuration, extracts documentation data from files, and processes each entry to remove the documentation for specified functions, updating the files accordingly.

Summary

Functions

Parameters

  • None

Description

Checks if there are any uncommitted changes in the git working directory.

Parameters

  • ast - the abstract syntax tree representing the module's source code.
  • module_ast - the name of the module where the function is defined.
  • name_func - the name of the function to be deleted from the module.

Description

Traverses the given abstract syntax tree to remove the specified function from the module's definitions.

Parameters

  • _command_line_args - a list of command-line arguments passed to the function.

Description

Initializes the LazyDoc application, runs the Mix task for app configuration, extracts data from files, and removes documentation from the AST based on the functions documented.

Functions

clean_tree?()

Parameters

  • None

Description

Checks if there are any uncommitted changes in the git working directory.

Returns

Returns true if the working directory is clean, otherwise it returns false.

delete_doc_from_ast(ast, module_ast, name_func)

Parameters

  • ast - the abstract syntax tree representing the module's source code.
  • module_ast - the name of the module where the function is defined.
  • name_func - the name of the function to be deleted from the module.

Description

Traverses the given abstract syntax tree to remove the specified function from the module's definitions.

Returns

The new abstract syntax tree with the specified function removed.

run(command_line_args)

Parameters

  • _command_line_args - a list of command-line arguments passed to the function.

Description

Initializes the LazyDoc application, runs the Mix task for app configuration, extracts data from files, and removes documentation from the AST based on the functions documented.

Returns

nil