Skip to content

Commit

Permalink
Merge pull request #51 from operable/cm/ebert
Browse files Browse the repository at this point in the history
Add Ebert
  • Loading branch information
christophermaier committed Mar 15, 2017
2 parents 4eb06b7 + 4bae1d6 commit f31f55e
Show file tree
Hide file tree
Showing 3 changed files with 118 additions and 0 deletions.
98 changes: 98 additions & 0 deletions .credo.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
%{
configs: [
%{
name: "default",
files: %{
included: ["lib/", "src/", "web/", "apps/", "test/"],
excluded: [~r"/_build/", ~r"/deps/"]
},
requires: [],
check_for_updates: false,
#
# You can customize the parameters of any check by adding a second element
# to the tuple.
#
# To disable a check put `false` as second element:
#
# {Credo.Check.Design.DuplicatedCode, false}
#
checks: [
{Credo.Check.Consistency.ExceptionNames},
{Credo.Check.Consistency.LineEndings},
{Credo.Check.Consistency.MultiAliasImportRequireUse},

# Disabling this for now as it also grabs variable bindings in
# function heads, which is annoying.
{Credo.Check.Consistency.SpaceAroundOperators, false},
{Credo.Check.Consistency.SpaceInParentheses},
{Credo.Check.Consistency.TabsOrSpaces},

# For some checks, like AliasUsage, you can only customize the priority
# Priority values are: `low, normal, high, higher` or disable it (false).
{Credo.Check.Design.AliasUsage, false},

# For others you can set parameters

# If you don't want the `setup` and `test` macro calls in ExUnit tests
# or the `schema` macro in Ecto schemas to trigger DuplicatedCode, just
# set the `excluded_macros` parameter to `[:schema, :setup, :test]`.
{Credo.Check.Design.DuplicatedCode, excluded_macros: []},

# Disabled for now as they are also checked by Code Climate
{Credo.Check.Design.TagTODO, false},
{Credo.Check.Design.TagFIXME, false},

{Credo.Check.Readability.FunctionNames},
{Credo.Check.Readability.LargeNumbers},
{Credo.Check.Readability.MaxLineLength, false},
{Credo.Check.Readability.ModuleAttributeNames},
{Credo.Check.Readability.ModuleDoc},
{Credo.Check.Readability.ModuleNames},
{Credo.Check.Readability.NoParenthesesWhenZeroArity, false},
{Credo.Check.Readability.ParenthesesInCondition},
{Credo.Check.Readability.PredicateFunctionNames},
{Credo.Check.Readability.TrailingBlankLine},
{Credo.Check.Readability.TrailingWhiteSpace},
{Credo.Check.Readability.VariableNames},
{Credo.Check.Readability.RedundantBlankLines},
{Credo.Check.Readability.SinglePipe},
{Credo.Check.Readability.Specs, false}, # This is the job of dialyzer
{Credo.Check.Readability.StringSigils},

{Credo.Check.Refactor.ABCSize, false},
{Credo.Check.Refactor.CondStatements},
{Credo.Check.Refactor.DoubleBooleanNegation, false}, # That's a feature!
{Credo.Check.Refactor.FunctionArity},
{Credo.Check.Refactor.MatchInCondition},
{Credo.Check.Refactor.PipeChainStart, false},
{Credo.Check.Refactor.CyclomaticComplexity},
{Credo.Check.Refactor.NegatedConditionsInUnless},
{Credo.Check.Refactor.NegatedConditionsWithElse},
{Credo.Check.Refactor.Nesting},
{Credo.Check.Refactor.UnlessWithElse},
{Credo.Check.Refactor.VariableRebinding, false}, # That's a feature!

{Credo.Check.Warning.IExPry},
{Credo.Check.Warning.IoInspect, false},

# Those are warned by Elixir when it is ambiguous since Elixir v1.4
{Credo.Check.Warning.NameRedeclarationByAssignment, false},
{Credo.Check.Warning.NameRedeclarationByCase, false},
{Credo.Check.Warning.NameRedeclarationByDef, false},
{Credo.Check.Warning.NameRedeclarationByFn, false},

{Credo.Check.Warning.OperationOnSameValues},
{Credo.Check.Warning.BoolOperationOnSameValues},
{Credo.Check.Warning.UnusedEnumOperation},
{Credo.Check.Warning.UnusedKeywordOperation},
{Credo.Check.Warning.UnusedListOperation},
{Credo.Check.Warning.UnusedStringOperation},
{Credo.Check.Warning.UnusedTupleOperation},
{Credo.Check.Warning.OperationWithConstantResult},

# Custom checks can be created using `mix credo.gen.check`.
#
]
}
]
}
19 changes: 19 additions & 0 deletions .ebert.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# This configuration was used Ebert to review the operable/piper repository
# on def53124ad4c507f8a36e4e70e6e1e9aa5f7c85f.
# You can make this the default configuration for future reviews by moving this
# file to your repository as `.ebert.yml` and pushing it to GitHub, and tweak
# it as you wish - To know more on how to change this file to better review your
# repository you can go to https://ebertapp.io/docs/config and see the configuration
# details.
---
styleguide: plataformatec/linters
engines:
credo:
enabled: true
fixme:
enabled: true
remark-lint:
enabled: true
exclude_paths:
- config
- test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Build Status](https://travis-ci.org/operable/greenbar.svg?branch=master)](https://travis-ci.org/operable/greenbar)
[![Coverage Status](https://coveralls.io/repos/github/operable/greenbar/badge.svg?branch=master)](https://coveralls.io/github/operable/greenbar?branch=master)
[![Ebert](https://ebertapp.io/github/operable/greenbar.svg)](https://ebertapp.io/github/operable/greenbar)

Standard template processors like erb, mustache, and eex return formatted output when they process a template.
Normally this is just fine as most applications use common formats like HTML or JSON for their outputs.
Expand Down

0 comments on commit f31f55e

Please sign in to comment.