-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
270 additions
and
24 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Coveralls | ||
|
||
on: push | ||
|
||
jobs: | ||
coveralls: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-mix-coveralls-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-coveralls- | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 25.1.2 | ||
elixir-version: 1.14.2 | ||
- run: mix deps.get | ||
- run: MIX_ENV=test mix coveralls.json | ||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v1 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Credo | ||
|
||
on: push | ||
|
||
jobs: | ||
credo: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
key: ${{ runner.os }}-mix-credo-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-credo- | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 25.1.2 | ||
elixir-version: 1.14.2 | ||
- run: mix deps.get | ||
- run: mix credo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Dialyzer | ||
|
||
on: push | ||
|
||
jobs: | ||
dialyzer: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
deps | ||
_build | ||
dialyzer | ||
key: ${{ runner.os }}-mix-dialyzer-${{ hashFiles('**/mix.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-mix-dialyzer- | ||
- uses: erlef/setup-beam@v1 | ||
with: | ||
otp-version: 25.1.2 | ||
elixir-version: 1.14.2 | ||
- run: mix deps.get | ||
- run: mix dialyzer | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
target: 20% | ||
threshold: 0% | ||
base: auto | ||
patch: | ||
default: | ||
target: 60% | ||
threshold: 2% | ||
base: auto | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
allowed_imports = [ | ||
[:Ecto] | ||
] | ||
|
||
%{ | ||
configs: [ | ||
%{ | ||
name: "default", | ||
files: %{ | ||
included: [ | ||
"lib/", | ||
"src/", | ||
"test/", | ||
"web/", | ||
"apps/*/lib/", | ||
"apps/*/src/", | ||
"apps/*/test/", | ||
"apps/*/web/" | ||
], | ||
excluded: [~r"_build/", ~r"deps/"] | ||
}, | ||
plugins: [], | ||
requires: ["deps/blitz_credo/lib/blitz_credo/"], | ||
strict: true, | ||
parse_timeout: 10000, | ||
color: true, | ||
checks: [ | ||
|
||
# BlitzCredoChecks | ||
|
||
{BlitzCredoChecks.SetWarningsAsErrorsInTest, false}, | ||
{BlitzCredoChecks.DocsBeforeSpecs, []}, | ||
{BlitzCredoChecks.DoctestIndent, []}, | ||
{BlitzCredoChecks.NoAsyncFalse, []}, | ||
{BlitzCredoChecks.NoDSLParentheses, []}, | ||
{BlitzCredoChecks.NoIsBitstring, []}, | ||
{BlitzCredoChecks.StrictComparison, []}, | ||
{BlitzCredoChecks.LowercaseTestNames, []}, | ||
{BlitzCredoChecks.ImproperImport, allowed_modules: allowed_imports}, | ||
|
||
# Consistency Checks | ||
{Credo.Check.Consistency.ExceptionNames, []}, | ||
{Credo.Check.Consistency.LineEndings, []}, | ||
{Credo.Check.Consistency.ParameterPatternMatching, []}, | ||
{Credo.Check.Consistency.SpaceAroundOperators, []}, | ||
{Credo.Check.Consistency.SpaceInParentheses, []}, | ||
{Credo.Check.Consistency.TabsOrSpaces, []}, | ||
|
||
# Design Checks | ||
{Credo.Check.Design.AliasUsage, false}, | ||
|
||
# No outstanding TODOs | ||
{Credo.Check.Design.TagTODO, []}, | ||
{Credo.Check.Design.TagFIXME, []}, | ||
|
||
# # Readability Checks | ||
{Credo.Check.Readability.AliasOrder, false}, | ||
{Credo.Check.Readability.FunctionNames, []}, | ||
{Credo.Check.Readability.LargeNumbers, []}, | ||
{Credo.Check.Readability.MaxLineLength, [max_length: 120]}, | ||
{Credo.Check.Readability.ModuleAttributeNames, []}, | ||
{Credo.Check.Readability.ModuleDoc, false}, | ||
{Credo.Check.Readability.ModuleNames, []}, | ||
{Credo.Check.Readability.ParenthesesInCondition, []}, | ||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, []}, | ||
{Credo.Check.Readability.PredicateFunctionNames, []}, | ||
{Credo.Check.Readability.PreferImplicitTry, []}, | ||
{Credo.Check.Readability.RedundantBlankLines, false}, | ||
{Credo.Check.Readability.Semicolons, []}, | ||
{Credo.Check.Readability.SpaceAfterCommas, false}, | ||
{Credo.Check.Readability.StringSigils, []}, | ||
{Credo.Check.Readability.TrailingBlankLine, false}, | ||
{Credo.Check.Readability.TrailingWhiteSpace, false}, | ||
{Credo.Check.Readability.UnnecessaryAliasExpansion, []}, | ||
{Credo.Check.Readability.VariableNames, []}, | ||
# | ||
# Refactoring Opportunities | ||
{Credo.Check.Refactor.CondStatements, []}, | ||
{Credo.Check.Refactor.CyclomaticComplexity, false}, | ||
{Credo.Check.Refactor.FunctionArity, []}, | ||
{Credo.Check.Refactor.LongQuoteBlocks, false}, | ||
{Credo.Check.Refactor.MapInto, false}, | ||
{Credo.Check.Refactor.MatchInCondition, []}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless, []}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse, []}, | ||
{Credo.Check.Refactor.Nesting, false}, | ||
{Credo.Check.Refactor.UnlessWithElse, []}, | ||
{Credo.Check.Refactor.WithClauses, []}, | ||
|
||
# Warnings | ||
{Credo.Check.Warning.BoolOperationOnSameValues, []}, | ||
{Credo.Check.Warning.ExpensiveEmptyEnumCheck, []}, | ||
{Credo.Check.Warning.IExPry, []}, | ||
{Credo.Check.Warning.IoInspect, []}, | ||
{Credo.Check.Warning.LazyLogging, false}, | ||
{Credo.Check.Warning.MixEnv, false}, | ||
{Credo.Check.Warning.OperationOnSameValues, []}, | ||
{Credo.Check.Warning.OperationWithConstantResult, []}, | ||
{Credo.Check.Warning.RaiseInsideRescue, []}, | ||
{Credo.Check.Warning.UnusedEnumOperation, []}, | ||
{Credo.Check.Warning.UnusedFileOperation, []}, | ||
{Credo.Check.Warning.UnusedKeywordOperation, []}, | ||
{Credo.Check.Warning.UnusedListOperation, []}, | ||
{Credo.Check.Warning.UnusedPathOperation, []}, | ||
{Credo.Check.Warning.UnusedRegexOperation, []}, | ||
{Credo.Check.Warning.UnusedStringOperation, []}, | ||
{Credo.Check.Warning.UnusedTupleOperation, []}, | ||
{Credo.Check.Warning.UnsafeExec, []}, | ||
|
||
# Controversial and experimental checks | ||
{Credo.Check.Readability.StrictModuleLayout, false}, | ||
{Credo.Check.Consistency.MultiAliasImportRequireUse, false}, | ||
{Credo.Check.Consistency.UnusedVariableNames, false}, | ||
{Credo.Check.Design.DuplicatedCode, false}, | ||
{Credo.Check.Readability.AliasAs, false}, | ||
{Credo.Check.Readability.MultiAlias, false}, | ||
{Credo.Check.Readability.Specs, false}, | ||
{Credo.Check.Readability.SinglePipe, []}, | ||
{Credo.Check.Readability.WithCustomTaggedTuple, []}, | ||
{Credo.Check.Refactor.ABCSize, false}, | ||
{Credo.Check.Refactor.AppendSingleItem, false}, | ||
{Credo.Check.Refactor.DoubleBooleanNegation, false}, | ||
{Credo.Check.Refactor.ModuleDependencies, false}, | ||
{Credo.Check.Refactor.NegatedIsNil, false}, | ||
{Credo.Check.Refactor.PipeChainStart, []}, | ||
{Credo.Check.Refactor.VariableRebinding, false}, | ||
{Credo.Check.Warning.LeakyEnvironment, false}, | ||
{Credo.Check.Warning.MapGetUnsafePass, false}, | ||
{Credo.Check.Warning.UnsafeToAtom, false} | ||
] | ||
} | ||
] | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
defmodule EctoShorts.Config do | ||
@moduledoc false | ||
|
||
@app :ecto_shorts | ||
|
||
def repo do | ||
|
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
Oops, something went wrong.