Skip to content

Enforce new RuboCop cops for all Ruby files #2365

Enforce new RuboCop cops for all Ruby files

Enforce new RuboCop cops for all Ruby files #2365

Triggered via pull request December 3, 2023 09:28
Status Failure
Total duration 40s
Artifacts

linter.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 10 warnings
RuboCop: app/controllers/announcements_controller.rb#L20
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/announcements_controller.rb#L36
Rails/Blank: Use `if @announcement.lecture.blank?` instead of `unless @announcement.lecture.present?`.
RuboCop: app/controllers/announcements_controller.rb#L69
Rails/TimeZone: Do not use `Time.now` without zone. Use one of `Time.zone.now`, `Time.current`, `Time.now.in_time_zone`, `Time.now.utc`, `Time.now.getlocal`, `Time.now.xmlschema`, `Time.now.iso8601`, `Time.now.jisx0301`, `Time.now.rfc3339`, `Time.now.httpdate`, `Time.now.to_i`, `Time.now.to_f` instead.
RuboCop: app/controllers/announcements_controller.rb#L99
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/answers_controller.rb#L11
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/answers_controller.rb#L45
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/assignments_controller.rb#L13
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/assignments_controller.rb#L47
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/assignments_controller.rb#L57
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/controllers/assignments_controller.rb#L65
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
RuboCop: app/models/lecture.rb#L646
Performance/MapMethodChain: Use `map { |x| x.commontator_thread.is_closed? }` instead of `map` method chain.
RuboCop: app/models/lecture.rb#L769
Performance/Detect: Use `find` instead of `select.first`.
RuboCop: app/models/lecture.rb#L774
Performance/Detect: Use `reverse.find` instead of `select.last`.
RuboCop: app/models/manuscript.rb#L108
Performance/MapCompact: Use `filter_map` instead.
RuboCop: app/models/manuscript.rb#L113
Performance/MapCompact: Use `filter_map` instead.
RuboCop: app/models/quiz_graph.rb#L93
Performance/InefficientHashSearch: Use `#value?` instead of `#values.include?`.
RuboCop: app/models/quiz_graph.rb#L318
Performance/Count: Use `count` instead of `select...count`.
RuboCop: app/models/submission.rb#L299
Performance/Count: Use `count` instead of `select...size`.
RuboCop: app/models/submission.rb#L315
Performance/Count: Use `count` instead of `select...size`.
RuboCop: app/models/tag.rb#L336
Performance/MapMethodChain: Use `map { |x| x.lecture.id }` instead of `map` method chain.