Created
September 2, 2015 00:02
-
-
Save 5thWall/81af469f0b5e32e5f53d to your computer and use it in GitHub Desktop.
A projectionist config for working on the Dogma Elixir style linter.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"lib/dogma/rules/*.ex": { | |
"type": "rule", | |
"alternate": "test/dogma/rules/{}_test.exs", | |
"template": [ | |
"defmodule Dogma.Rules.{camelcase|dot} do", | |
" @moduledoc \"\"\"", | |
" Please add a rule description. With code examples if possible." | |
" \"\"\"", | |
"", | |
" @behaviour Dogma.Rule", | |
"", | |
" alias Dogma.Script", | |
" alias Dogma.Error", | |
"", | |
" def test(script, _config \\ []) do", | |
" end" | |
"end" | |
] | |
}, | |
"lib/*.ex": { | |
"type": "lib", | |
"alternate": "test/{}_test.exs", | |
"template": [ | |
"defmodule {camelcase|dot} do", | |
" @moduledoc \"\"\"", | |
" \"\"\"", | |
"end" | |
] | |
}, | |
"test/dogma/rules/*_test.exs": { | |
"type": "ruletest", | |
"alternate": "lib/dogma/rules/{}.ex", | |
"template": [ | |
"defmodule Dogma.Rules.{camelcase|dot}Test do", | |
" use ShouldI", | |
"", | |
" alias Dogma.Rules.{camelcase|dot}", | |
" alias Dogma.Script", | |
" alias Dogma.Error", | |
"", | |
" defp apply_rule(script) do", | |
" script", | |
" |> Script.parse(\"foo.ex\")", | |
" |> {camelcase|dot}.test", | |
" end", | |
"end" | |
] | |
}, | |
"test/*_test.exs": { | |
"type": "test", | |
"alternate": "lib/{}.ex", | |
"template": [ | |
"defmodule {camelcase|dot}Test do", | |
" use ShouldI", | |
"end" | |
] | |
}, | |
"*": { | |
"make": "mix" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment