.ameba.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. # produce_search_params(page, sort, ...) => [29/10]
  60. # process_search_query(query, page, ...) => [14/10]
  61. - src/invidious/search.cr
  62. #src/invidious/playlists.cr:327:5
  63. #[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [19/10]
  64. # fetch_playlist(plid : String)
  65. #src/invidious/playlists.cr:436:5
  66. #[C] Metrics/CyclomaticComplexity: Cyclomatic complexity too high [11/10]
  67. # extract_playlist_videos(initial_data : Hash(String, JSON::Any))