.ameba.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #
  2. # Lint
  3. #
  4. # Exclude assigns for ECR files
  5. Lint/UselessAssign:
  6. Excluded:
  7. - src/invidious.cr
  8. - src/invidious/helpers/errors.cr
  9. - src/invidious/routes/**/*.cr
  10. # Ignore false negative (if !db.query_one?...)
  11. Lint/UnreachableCode:
  12. Excluded:
  13. - src/invidious/database/base.cr
  14. # Ignore shadowed variable `key` (it works for now, and that's
  15. # a sensitive part of the code)
  16. Lint/ShadowingOuterLocalVar:
  17. Excluded:
  18. - src/invidious/helpers/tokens.cr
  19. Lint/NotNil:
  20. Enabled: false
  21. Lint/SpecFilename:
  22. Excluded:
  23. - spec/parsers_helper.cr
  24. #
  25. # Style
  26. #
  27. Style/RedundantBegin:
  28. Enabled: false
  29. Style/RedundantReturn:
  30. Enabled: false
  31. Style/ParenthesesAroundCondition:
  32. Enabled: false
  33. # This requires a rewrite of most data structs (and their usage) in Invidious.
  34. Naming/QueryBoolMethods:
  35. Enabled: false
  36. Naming/AccessorMethodName:
  37. Enabled: false
  38. Naming/BlockParameterName:
  39. Enabled: false
  40. # Hides TODO comment warnings.
  41. #
  42. # Call `bin/ameba --only Documentation/DocumentationAdmonition` to
  43. # list them
  44. Documentation/DocumentationAdmonition:
  45. Enabled: false
  46. #
  47. # Metrics
  48. #
  49. # Ignore function complexity (number of if/else & case/when branches)
  50. # For some functions that can hardly be simplified for now
  51. Metrics/CyclomaticComplexity:
  52. Enabled: false