.ameba.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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/RedundantNext:
  32. Enabled: false
  33. Style/ParenthesesAroundCondition:
  34. Enabled: false
  35. # This requires a rewrite of most data structs (and their usage) in Invidious.
  36. Naming/QueryBoolMethods:
  37. Enabled: false
  38. Naming/AccessorMethodName:
  39. Enabled: false
  40. Naming/BlockParameterName:
  41. Enabled: false
  42. # Hides TODO comment warnings.
  43. #
  44. # Call `bin/ameba --only Documentation/DocumentationAdmonition` to
  45. # list them
  46. Documentation/DocumentationAdmonition:
  47. Enabled: false
  48. #
  49. # Metrics
  50. #
  51. # Ignore function complexity (number of if/else & case/when branches)
  52. # For some functions that can hardly be simplified for now
  53. Metrics/CyclomaticComplexity:
  54. Enabled: false