-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(WIP) update documentation for 1.0 (#166)
- begins documenting every rewrite styler does via a cheatsheet - adds TODOs to readme
- Loading branch information
Showing
8 changed files
with
397 additions
and
111 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
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,46 @@ | ||
### Credo Rules Styler Replaces | ||
|
||
If you're using Credo and Styler, **we recommend disabling these rules in `.credo.exs`** to save on unnecessary checks in CI. | ||
|
||
Disabling the rules means updating your `.credo.exs` depending on your configuration: | ||
|
||
- if you're using `checks: %{enabled: [...]}`, ensure none of the checks are listed in your enabled checks | ||
- if you're using `checks: %{disabled: [...]}`, copy/paste the snippet below into the list | ||
- if you're using `checks: [...]`, copy/paste the snippet below into the list and ensure none of the checks appear earlier in the list | ||
|
||
```elixir | ||
# Styler Rewrites | ||
# | ||
# The following rules are automatically rewritten by Styler and so disabled here to save time | ||
# Some of the rules have `priority: :high`, meaning Credo runs them unless we explicitly disable them | ||
# (removing them from this file wouldn't be enough, the `false` is required) | ||
# | ||
{Credo.Check.Consistency.MultiAliasImportRequireUse, false}, | ||
{Credo.Check.Consistency.ParameterPatternMatching, false}, | ||
{Credo.Check.Design.AliasUsage, false}, | ||
{Credo.Check.Readability.AliasOrder, false}, | ||
{Credo.Check.Readability.BlockPipe, false}, | ||
{Credo.Check.Readability.LargeNumbers, false}, | ||
{Credo.Check.Readability.ModuleDoc, false}, | ||
{Credo.Check.Readability.MultiAlias, false}, | ||
{Credo.Check.Readability.OneArityFunctionInPipe, false}, | ||
{Credo.Check.Readability.ParenthesesOnZeroArityDefs, false}, | ||
{Credo.Check.Readability.PipeIntoAnonymousFunctions, false}, | ||
{Credo.Check.Readability.PreferImplicitTry, false}, | ||
{Credo.Check.Readability.SinglePipe, false}, | ||
{Credo.Check.Readability.StrictModuleLayout, false}, | ||
{Credo.Check.Readability.StringSigils, false}, | ||
{Credo.Check.Readability.UnnecessaryAliasExpansion, false}, | ||
{Credo.Check.Readability.WithSingleClause, false}, | ||
{Credo.Check.Refactor.CaseTrivialMatches, false}, | ||
{Credo.Check.Refactor.CondStatements, false}, | ||
{Credo.Check.Refactor.FilterCount, false}, | ||
{Credo.Check.Refactor.MapInto, false}, | ||
{Credo.Check.Refactor.MapJoin, false}, | ||
{Credo.Check.Refactor.NegatedConditionsInUnless, false}, | ||
{Credo.Check.Refactor.NegatedConditionsWithElse, false}, | ||
{Credo.Check.Refactor.PipeChainStart, false}, | ||
{Credo.Check.Refactor.RedundantWithClauseResult, false}, | ||
{Credo.Check.Refactor.UnlessWithElse, false}, | ||
{Credo.Check.Refactor.WithClauses, false}, | ||
``` |
Oops, something went wrong.