Enforce new RuboCop cops for all Ruby files #2366
Annotations
10 errors and 10 warnings
app/controllers/announcements_controller.rb#L20
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/announcements_controller.rb#L36
Rails/Blank: Use `if @announcement.lecture.blank?` instead of `unless @announcement.lecture.present?`.
|
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.
|
app/controllers/announcements_controller.rb#L99
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/answers_controller.rb#L11
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/answers_controller.rb#L45
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/assignments_controller.rb#L13
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/assignments_controller.rb#L47
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/assignments_controller.rb#L57
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/controllers/assignments_controller.rb#L65
Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_id`.
|
app/models/lecture.rb#L646
Performance/MapMethodChain: Use `map { |x| x.commontator_thread.is_closed? }` instead of `map` method chain.
|
app/models/lecture.rb#L769
Performance/Detect: Use `find` instead of `select.first`.
|
app/models/lecture.rb#L774
Performance/Detect: Use `reverse.find` instead of `select.last`.
|
app/models/manuscript.rb#L108
Performance/MapCompact: Use `filter_map` instead.
|
app/models/manuscript.rb#L113
Performance/MapCompact: Use `filter_map` instead.
|
app/models/quiz_graph.rb#L93
Performance/InefficientHashSearch: Use `#value?` instead of `#values.include?`.
|
app/models/quiz_graph.rb#L318
Performance/Count: Use `count` instead of `select...count`.
|
app/models/submission.rb#L293
Performance/Count: Use `count` instead of `select...size`.
|
app/models/submission.rb#L309
Performance/Count: Use `count` instead of `select...size`.
|
app/models/tag.rb#L336
Performance/MapMethodChain: Use `map { |x| x.lecture.id }` instead of `map` method chain.
|
The logs for this run have expired and are no longer available.
Loading