mix lazy_doc.check (LazyDoc v0.5.3)

View Source

Main functionality

The module Mix.Tasks.LazyDoc.Check is designed to facilitate the checking of documentation for functions and modules within a codebase using the LazyDoc application.

Description

It initializes the LazyDoc application, identifies undocumented functions and modules across specified files, and exits with an appropriate status code based on the presence of undocumented elements. Warnings are logged for any undocumented functions and modules encountered during the check.

Summary

Functions

Returns a list of modules that contain undocumented functions.

Returns true if undocumented modules are found; otherwise, it returns false.

Returns a warning log for undocumented functions in a specified module.

Returns the exit status of the application based on the presence of undocumented functions or modules.

Functions

get_undocumented_functions(entry_functions, file)

Returns a list of modules that contain undocumented functions.

Parameters

  • entry_functions - a list of tuples containing module information and their respective function ASTs.
  • file - the file name where the functions are being analyzed.

Description

Iterates over the entry functions and prints warnings for undocumented functions.

get_undocumented_modules(modules, file)

Returns true if undocumented modules are found; otherwise, it returns false.

Parameters

  • modules - a list of modules to check for documentation.
  • file - the name of the file being analyzed for undocumented modules.

Description

Logs warnings for each undocumented module along with the associated file name.

run(command_line_args)

Returns the exit status of the application based on the presence of undocumented functions or modules.

Parameters

  • _command_line_args - the command line arguments passed to the function.

Description

Initializes the application, runs the Mix task for configuration, and checks for undocumented functions and modules in extracted data.