logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

.credo.exs (6095B)


  1. # This file contains the configuration for Credo and you are probably reading
  2. # this after creating it with `mix credo.gen.config`.
  3. #
  4. # If you find anything wrong or unclear in this file, please report an
  5. # issue on GitHub: https://github.com/rrrene/credo/issues
  6. #
  7. %{
  8. #
  9. # You can have as many configs as you like in the `configs:` field.
  10. configs: [
  11. %{
  12. #
  13. # Run any config using `mix credo -C <name>`. If no config name is given
  14. # "default" is used.
  15. name: "default",
  16. #
  17. # These are the files included in the analysis:
  18. files: %{
  19. #
  20. # You can give explicit globs or simply directories.
  21. # In the latter case `**/*.{ex,exs}` will be used.
  22. included: ["lib/", "src/", "web/", "apps/", "test/"],
  23. excluded: [~r"/_build/", ~r"/deps/"]
  24. },
  25. #
  26. # If you create your own checks, you must specify the source files for
  27. # them here, so they can be loaded by Credo before running the analysis.
  28. requires: ["./test/credo/check/consistency/file_location.ex"],
  29. #
  30. # Credo automatically checks for updates, like e.g. Hex does.
  31. # You can disable this behaviour below:
  32. check_for_updates: true,
  33. #
  34. # If you want to enforce a style guide and need a more traditional linting
  35. # experience, you can change `strict` to `true` below:
  36. strict: false,
  37. #
  38. # If you want to use uncolored output by default, you can change `color`
  39. # to `false` below:
  40. color: true,
  41. #
  42. # You can customize the parameters of any check by adding a second element
  43. # to the tuple.
  44. #
  45. # To disable a check put `false` as second element:
  46. #
  47. # {Credo.Check.Design.DuplicatedCode, false}
  48. #
  49. checks: [
  50. {Credo.Check.Consistency.ExceptionNames},
  51. {Credo.Check.Consistency.LineEndings},
  52. {Credo.Check.Consistency.MultiAliasImportRequireUse},
  53. {Credo.Check.Consistency.ParameterPatternMatching},
  54. {Credo.Check.Consistency.SpaceAroundOperators},
  55. {Credo.Check.Consistency.SpaceInParentheses},
  56. {Credo.Check.Consistency.TabsOrSpaces},
  57. # For some checks, like AliasUsage, you can only customize the priority
  58. # Priority values are: `low, normal, high, higher`
  59. {Credo.Check.Design.AliasUsage, priority: :low, if_called_more_often_than: 3},
  60. # For others you can set parameters
  61. # If you don't want the `setup` and `test` macro calls in ExUnit tests
  62. # or the `schema` macro in Ecto schemas to trigger DuplicatedCode, just
  63. # set the `excluded_macros` parameter to `[:schema, :setup, :test]`.
  64. {Credo.Check.Design.DuplicatedCode, excluded_macros: []},
  65. # You can also customize the exit_status of each check.
  66. # If you don't want TODO comments to cause `mix credo` to fail, just
  67. # set this value to 0 (zero).
  68. {Credo.Check.Design.TagTODO, exit_status: 0},
  69. {Credo.Check.Design.TagFIXME, exit_status: 0},
  70. {Credo.Check.Readability.FunctionNames},
  71. {Credo.Check.Readability.LargeNumbers},
  72. {Credo.Check.Readability.MaxLineLength, priority: :low, max_length: 100},
  73. {Credo.Check.Readability.ModuleAttributeNames},
  74. {Credo.Check.Readability.ModuleDoc, false},
  75. {Credo.Check.Readability.ModuleNames},
  76. {Credo.Check.Readability.ParenthesesOnZeroArityDefs},
  77. {Credo.Check.Readability.ParenthesesInCondition},
  78. {Credo.Check.Readability.PredicateFunctionNames},
  79. # lanodan: I think PreferImplicitTry should be consistency, and the behaviour seems
  80. # inconsistent, see: https://github.com/rrrene/credo/issues/224
  81. {Credo.Check.Readability.PreferImplicitTry, false},
  82. {Credo.Check.Readability.PipeIntoAnonymousFunctions, exit_status: 0},
  83. {Credo.Check.Readability.RedundantBlankLines},
  84. {Credo.Check.Readability.StringSigils},
  85. {Credo.Check.Readability.TrailingBlankLine},
  86. {Credo.Check.Readability.TrailingWhiteSpace},
  87. {Credo.Check.Readability.VariableNames},
  88. {Credo.Check.Readability.Semicolons},
  89. {Credo.Check.Readability.SpaceAfterCommas},
  90. {Credo.Check.Readability.WithSingleClause, exit_status: 0},
  91. {Credo.Check.Refactor.DoubleBooleanNegation},
  92. {Credo.Check.Refactor.CondStatements},
  93. {Credo.Check.Refactor.CyclomaticComplexity},
  94. {Credo.Check.Refactor.FunctionArity},
  95. {Credo.Check.Refactor.MatchInCondition},
  96. {Credo.Check.Refactor.NegatedConditionsInUnless},
  97. {Credo.Check.Refactor.NegatedConditionsWithElse},
  98. {Credo.Check.Refactor.Nesting},
  99. {Credo.Check.Refactor.PipeChainStart},
  100. {Credo.Check.Refactor.UnlessWithElse},
  101. {Credo.Check.Warning.BoolOperationOnSameValues},
  102. {Credo.Check.Warning.IExPry},
  103. {Credo.Check.Warning.IoInspect},
  104. # Got too much of them, not sure if relevant
  105. {Credo.Check.Warning.LazyLogging, false},
  106. {Credo.Check.Warning.OperationOnSameValues},
  107. {Credo.Check.Warning.OperationWithConstantResult},
  108. {Credo.Check.Warning.UnusedEnumOperation},
  109. {Credo.Check.Warning.UnusedFileOperation},
  110. {Credo.Check.Warning.UnusedKeywordOperation},
  111. {Credo.Check.Warning.UnusedListOperation},
  112. {Credo.Check.Warning.UnusedPathOperation},
  113. {Credo.Check.Warning.UnusedRegexOperation},
  114. {Credo.Check.Warning.UnusedStringOperation},
  115. {Credo.Check.Warning.UnusedTupleOperation},
  116. # Controversial and experimental checks (opt-in, just remove `, false`)
  117. #
  118. {Credo.Check.Refactor.ABCSize, false},
  119. {Credo.Check.Refactor.AppendSingleItem, false},
  120. {Credo.Check.Refactor.VariableRebinding, false},
  121. {Credo.Check.Warning.MapGetUnsafePass, false},
  122. # Deprecated checks (these will be deleted after a grace period)
  123. {Credo.Check.Readability.Specs, false},
  124. # Custom checks can be created using `mix credo.gen.check`.
  125. #
  126. {Credo.Check.Consistency.FileLocation}
  127. ]
  128. }
  129. ]
  130. }