Dogma v0.0.3

Modules summary

Dogma

Welcome to Dogma

Dogma.Error

This module provides the struct we use to represent errors found in a file by Rules. These %Errors are to be passed to and reported by a formatter

Dogma.Formatter

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

Dogma.Formatter.Null

A formatter that prints nothing. Ever

Dogma.Formatter.Simple

A formatter that prints a dot per file, followed by details at the end

Dogma.Rule

The Rule behaviour, used to assert the interface used by our Rule modules

Dogma.Rules

Responsible for running of the appropriate rule set on a given set of scripts with the appropriate configuration

Dogma.Rules.DebuggerStatement

A rule that disallows calls to IEx.pry, as while useful, we probably don’t want them committed

Dogma.Rules.FinalNewline

A rule that disallows files that don’t end with a final newline

Dogma.Rules.FunctionArity

A rule that disallows functions with arity greater than 4 (configurable)

Dogma.Rules.FunctionName

A rule that disallows function names not in snake_case

Dogma.Rules.LineLength

A rule that disallows lines longer than 80 columns in length

Dogma.Rules.LiteralInCondition

A rule that disallows useless conditional statements that contain a literal in place of a variable or predicate function

Dogma.Rules.ModuleAttributeName

A rule that disallows module attribute names not in snake_case

Dogma.Rules.ModuleDoc

A rule that disallows the use of an if or unless with a negated predicate

Dogma.Rules.ModuleName

A rule that disallows module names not in PascalCase

Dogma.Rules.NegatedIfUnless

A rule that disallows the use of an if or unless with a negated predicate

Dogma.Rules.QuotesInString

A rule that disallows strings containing double quotes. Use s_sigil or S_sigil instead

Dogma.Rules.Sets.All

The module which defines all the rules to run in Dogma

Dogma.Rules.TrailingBlankLines

A rule that disallows trailing blank lines as the end of a source file

Dogma.Rules.TrailingWhitespace

A rule that disallows trailing whitespace at the end of a line

Dogma.Rules.UnlessElse

A rule that disallows the use of an else block with the unless macro

Dogma.Rules.VariableName

A rule that disallows variable names not in snake_case

Dogma.Rules.WindowsLineEndings

A rule that disallows any lines terminated with

Dogma.Script

This module provides the struct that we use to reprisent source files, their abstract syntax tree, etc, as well as a few convenient functions for working with them

Dogma.ScriptSources

A module responsible for the identifying of Elixir source files to be analyised by Dogma

Dogma.Util.CyclomaticComplexity

A module for calculating the cyclomatic complexity for an AST

Dogma.Util.Name

Utility functions for analysing names

Dogma.Util.ScriptStrings

A preprocessor for scripts, to be used on the script string before the AST, lines, etc have been computed for it

Mix.Tasks.Dogma

Check Elixir source files for style violations