diff --git a/config/config.exs b/config/config.exs index 6dfa82f..ed87792 100644 --- a/config/config.exs +++ b/config/config.exs @@ -21,4 +21,4 @@ use Mix.Config # Configuration from the imported file will override the ones defined # here (which is why it is important to import them last). # -# import_config "#{Mix.env}.exs" +import_config "#{Mix.env}.exs" diff --git a/config/dev.exs b/config/dev.exs new file mode 100644 index 0000000..1fea245 --- /dev/null +++ b/config/dev.exs @@ -0,0 +1,41 @@ +use Mix.Config + +defmodule Sqlitex.DogmaRuleSet do + @behaviour Dogma.RuleSet + def rules do + [ + {BarePipeChainStart}, + {ComparisonToBoolean}, + {DebuggerStatement}, + {ExceptionName}, + {FinalCondition}, + {FinalNewline}, + {FunctionArity, max: 4}, + {FunctionName}, + {HardTabs}, + {LineLength, max_length: 100}, + {LiteralInCondition}, + {LiteralInInterpolation}, + {MatchInCondition}, + {ModuleAttributeName}, + {ModuleDoc}, + {ModuleName}, + {NegatedIfUnless}, + {PredicateName}, + {QuotesInString}, + {Semicolon}, + {TrailingBlankLines}, + {TrailingWhitespace}, + {UnlessElse}, + {VariableName}, + {WindowsLineEndings}, + ] + end +end + + +config :dogma, + rule_set: Sqlitex.DogmaRuleSet, + exclude: [ + ~r(\Atest/test_database.exs), + ] diff --git a/config/test.exs b/config/test.exs new file mode 100644 index 0000000..d2d855e --- /dev/null +++ b/config/test.exs @@ -0,0 +1 @@ +use Mix.Config diff --git a/mix.lock b/mix.lock index 21a4e2c..619809f 100644 --- a/mix.lock +++ b/mix.lock @@ -1,8 +1,9 @@ %{"decimal": {:hex, :decimal, "1.1.0"}, - "dogma": {:hex, :dogma, "0.0.7"}, + "dialyze": {:hex, :dialyze, "0.2.0"}, + "dogma": {:hex, :dogma, "0.0.9"}, "earmark": {:hex, :earmark, "0.1.17"}, "esqlite": {:hex, :esqlite, "0.2.1"}, - "ex_doc": {:hex, :ex_doc, "0.9.0"}, + "ex_doc": {:hex, :ex_doc, "0.10.0"}, "inch_ex": {:hex, :inch_ex, "0.4.0"}, "pipe": {:hex, :pipe, "0.0.2"}, "poison": {:hex, :poison, "1.5.0"}}