mix lazy_doc.clean (LazyDoc v0.5.3)

View Source

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

Returns a boolean indicating whether the working directory is clean.

Returns the updated AST after removing the specified function definition from the given module.

Returns the result of executing the _command_line_args through the LazyDoc application.

Functions

clean_tree?()

Returns a boolean indicating whether the working directory is clean.

Parameters

  • None

Description

Executes a system command to check for differences in the working directory.

delete_doc_from_ast(ast, module_ast, name_func)

Returns the updated AST after removing the specified function definition from the given module.

Parameters

  • ast - the original abstract syntax tree (AST) of the module.
  • module_ast - the AST representation of the target module.
  • name_func - the name of the function to be deleted from the AST.

Description

Traverses the AST to locate and remove a specified function definition from a given module's AST.

run(command_line_args)

Returns the result of executing the _command_line_args through the LazyDoc application.

Parameters

  • _command_line_args - command line arguments to be processed by the function.

Description

Handles the execution logic for documenting files and managing application configurations.