Dogma.Formatter behaviour

Handles formatters. In short, decides what we should print to STDOUT.

Also provides the formatter behaviour.

Source

Summary

default_formatter()

Returns the default formatter

finish(files, formatter \\ Dogma.Formatter.Simple)

Runs at the end of the test suite

formatters()

Returns formatters mapped to their option keys”

script(script, formatter \\ Dogma.Formatter.Simple)

Runs after each script is tested. Useful for progress indicators

start(files, formatter \\ Dogma.Formatter.Simple)

Runs at the start of the test suite

Functions

default_formatter()

Returns the default formatter

Source
finish(files, formatter \\ Dogma.Formatter.Simple)

Runs at the end of the test suite.

Source
formatters()

Returns formatters mapped to their option keys”

Source
script(script, formatter \\ Dogma.Formatter.Simple)

Runs after each script is tested. Useful for progress indicators.

Source
start(files, formatter \\ Dogma.Formatter.Simple)

Runs at the start of the test suite.

Source

Callbacks

start/1

Specs:

  • start([%Dogma.Script{ast: term, errors: term, lines: term, path: term, processed_lines: term, processed_source: term, source: term, tokens: term, valid?: term}]) :: String.t

Formats the message to be printed at the start of the test suite.

Source
script/1

Specs:

  • script([%Dogma.Script{ast: term, errors: term, lines: term, path: term, processed_lines: term, processed_source: term, source: term, tokens: term, valid?: term}]) :: String.t

Formats the message to be printed after each script has been tested.

Source
finish/1

Specs:

  • finish([%Dogma.Script{ast: term, errors: term, lines: term, path: term, processed_lines: term, processed_source: term, source: term, tokens: term, valid?: term}]) :: String.t

Formats the message to be printed at the end of the test suite.

Source