KogenCredo.CoreSupport.Modules (KogenCredo v0.1.0)

View Source

Module-name scoping: removes the bodies of modules that a check is configured to skip (for example codec modules), resolving nested defmodule names.

Summary

Functions

Returns ast with the body of every defmodule whose full name equals or lies under one of skip emptied out, so a later walk ignores it.

Functions

prune(ast, skip)

Returns ast with the body of every defmodule whose full name equals or lies under one of skip emptied out, so a later walk ignores it.

skip lists module references: atoms (MyApp.Codec) or names ("MyApp.Codec"). They are compared by name, so a module that does not exist in the running VM prunes like any other.