.ameba.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. #
  20. # Style
  21. #
  22. Style/RedundantBegin:
  23. Enabled: false
  24. Style/RedundantReturn:
  25. Enabled: false
  26. #
  27. # Metrics
  28. #
  29. # Ignore function complexity (number of if/else & case/when branches)
  30. # For some functions that can hardly be simplified for now
  31. Metrics/CyclomaticComplexity:
  32. Excluded:
  33. # get_about_info(ucid, locale) => [17/10]
  34. - src/invidious/channels/about.cr
  35. # fetch_channel_community(ucid, continuation, ...) => [34/10]
  36. - src/invidious/channels/community.cr
  37. # create_notification_stream(env, topics, connection_channel) => [14/10]
  38. - src/invidious/helpers/helpers.cr:84:5
  39. # get_index(plural_form, count) => [25/10]
  40. - src/invidious/helpers/i18next.cr
  41. # call(context) => [18/10]
  42. - src/invidious/helpers/static_file_handler.cr
  43. # show(env) => [38/10]
  44. - src/invidious/routes/embed.cr
  45. # get_video_playback(env) => [45/10]
  46. - src/invidious/routes/video_playback.cr
  47. # handle(env) => [40/10]
  48. - src/invidious/routes/watch.cr
  49. # playlist_ajax(env) => [24/10]
  50. - src/invidious/routes/playlists.cr
  51. # fetch_youtube_comments(id, cursor, ....) => [40/10]
  52. # template_youtube_comments(comments, locale, ...) => [16/10]
  53. # content_to_comment_html(content) => [14/10]
  54. - src/invidious/comments.cr
  55. # to_json(locale, json) => [21/10]
  56. # extract_video_info(video_id, ...) => [44/10]
  57. # process_video_params(query, preferences) => [20/10]
  58. - src/invidious/videos.cr
  59. #src/invidious/playlists.cr:327:5
  60. #[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [19/10]
  61. # fetch_playlist(plid : String)
  62. #src/invidious/playlists.cr:436:5
  63. #[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [11/10]
  64. # extract_playlist_videos(initial_data : Hash(String, JSON::Any))