forked from autolab/Autolab
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrubocop-issues.txt
2803 lines (2800 loc) · 151 KB
/
rubocop-issues.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Inspecting 151 files
..C..CWWWCC.WC.CWCCWCW..WCWWCCCCCWWCCCCCCCCCCCC..WCC..WCWCWCC.CCCWCCC....EC.CCCWCCCC.C..W................W..............W...........................CCC
Offenses:
app/controllers/admins_controller.rb:10:3: C: Assignment Branch Condition size for email_instructors is too high. [19.13/15]
def email_instructors
^^^
app/controllers/admins_controller.rb:12:53: C: Do not use [33mDateTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
.where("courses.end_date > ?", DateTime.now).where(instructor: true)
^^^
app/controllers/application_controller.rb:9:1: C: Class definition is too long. [242/100]
class ApplicationController < ActionController::Base
^^^^^
app/controllers/application_controller.rb:43:3: C: Replace class var @@global_whitelist with a class instance var.
@@global_whitelist = {}
^^^^^^^^^^^^^^^^^^
app/controllers/application_controller.rb:44:3: C: Assignment Branch Condition size for action_auth_level is too high. [22.23/15]
def self.action_auth_level(action, level)
^^^
app/controllers/application_controller.rb:44:3: C: Cyclomatic complexity for action_auth_level is too high. [8/6]
def self.action_auth_level(action, level)
^^^
app/controllers/application_controller.rb:44:3: C: Perceived complexity for action_auth_level is too high. [8/7]
def self.action_auth_level(action, level)
^^^
app/controllers/application_controller.rb:102:3: C: Assignment Branch Condition size for authenticate_for_action is too high. [16.88/15]
def authenticate_for_action
^^^
app/controllers/application_controller.rb:132:3: C: Assignment Branch Condition size for set_course is too high. [19.54/15]
def set_course
^^^
app/controllers/application_controller.rb:132:3: C: Cyclomatic complexity for set_course is too high. [8/6]
def set_course
^^^
app/controllers/application_controller.rb:132:3: C: Perceived complexity for set_course is too high. [8/7]
def set_course
^^^
app/controllers/application_controller.rb:151:3: C: Assignment Branch Condition size for authorize_user_for_course is too high. [67.31/15]
def authorize_user_for_course
^^^
app/controllers/application_controller.rb:151:3: C: Cyclomatic complexity for authorize_user_for_course is too high. [22/6]
def authorize_user_for_course
^^^
app/controllers/application_controller.rb:151:3: C: Method has too many lines. [39/20]
def authorize_user_for_course
^^^
app/controllers/application_controller.rb:151:3: C: Perceived complexity for authorize_user_for_course is too high. [21/7]
def authorize_user_for_course
^^^
app/controllers/application_controller.rb:211:3: C: Assignment Branch Condition size for set_assessment is too high. [17.12/15]
def set_assessment
^^^
app/controllers/application_controller.rb:211:3: C: Cyclomatic complexity for set_assessment is too high. [7/6]
def set_assessment
^^^
app/controllers/application_controller.rb:227:3: C: Assignment Branch Condition size for set_submission is too high. [31.8/15]
def set_submission
^^^
app/controllers/application_controller.rb:227:3: C: Cyclomatic complexity for set_submission is too high. [14/6]
def set_submission
^^^
app/controllers/application_controller.rb:227:3: C: Perceived complexity for set_submission is too high. [14/7]
def set_submission
^^^
app/controllers/application_controller.rb:250:3: C: Assignment Branch Condition size for run_scheduler is too high. [33.39/15]
def run_scheduler
^^^
app/controllers/application_controller.rb:250:3: C: Method has too many lines. [21/20]
def run_scheduler
^^^
app/controllers/application_controller.rb:251:48: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
actions = Scheduler.where("next < ?", Time.now)
^^^
app/controllers/application_controller.rb:253:26: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
action.next = Time.now + action.interval
^^^
app/controllers/application_controller.rb:316:3: C: Assignment Branch Condition size for render_error is too high. [26.42/15]
def render_error(exception)
^^^
app/controllers/application_controller.rb:316:3: C: Cyclomatic complexity for render_error is too high. [9/6]
def render_error(exception)
^^^
app/controllers/application_controller.rb:316:3: C: Perceived complexity for render_error is too high. [9/7]
def render_error(exception)
^^^
app/controllers/assessment/autograde.rb:13:3: C: Assignment Branch Condition size for autograde_done is too high. [32.89/15]
def autograde_done
^^^
app/controllers/assessment/autograde.rb:13:3: C: Cyclomatic complexity for autograde_done is too high. [8/6]
def autograde_done
^^^
app/controllers/assessment/autograde.rb:13:3: C: Perceived complexity for autograde_done is too high. [9/7]
def autograde_done
^^^
app/controllers/assessment/autograde.rb:63:3: C: Assignment Branch Condition size for regradeBatch is too high. [28.34/15]
def regradeBatch
^^^
app/controllers/assessment/autograde.rb:63:3: C: Cyclomatic complexity for regradeBatch is too high. [8/6]
def regradeBatch
^^^
app/controllers/assessment/autograde.rb:63:3: C: Method has too many lines. [25/20]
def regradeBatch
^^^
app/controllers/assessment/autograde.rb:63:3: C: Perceived complexity for regradeBatch is too high. [10/7]
def regradeBatch
^^^
app/controllers/assessment/autograde.rb:63:7: C: Use snake_case for method names.
def regradeBatch
^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:76:64: W: Non-local exit from iterator, without return value. [33mnext[0m, [33mbreak[0m, [33mArray#find[0m, [33mArray#any?[0m, etc. is preferred.
redirect_to([@course, @assessment, :submissions]) && return
^^^^^^
app/controllers/assessment/autograde.rb:87:101: C: Line is too long. [115/100]
flash[:error] = "Warning: Could not regrade #{failed_jobs} submission(s):<br>" + failed_list if failed_jobs > 0
^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:104:3: C: Assignment Branch Condition size for regradeAll is too high. [28.34/15]
def regradeAll
^^^
app/controllers/assessment/autograde.rb:104:3: C: Cyclomatic complexity for regradeAll is too high. [8/6]
def regradeAll
^^^
app/controllers/assessment/autograde.rb:104:3: C: Method has too many lines. [26/20]
def regradeAll
^^^
app/controllers/assessment/autograde.rb:104:3: C: Perceived complexity for regradeAll is too high. [10/7]
def regradeAll
^^^
app/controllers/assessment/autograde.rb:104:7: C: Use snake_case for method names.
def regradeAll
^^^^^^^^^^
app/controllers/assessment/autograde.rb:119:64: W: Non-local exit from iterator, without return value. [33mnext[0m, [33mbreak[0m, [33mArray#find[0m, [33mArray#any?[0m, etc. is preferred.
redirect_to([@course, @assessment, :submissions]) && return
^^^^^^
app/controllers/assessment/autograde.rb:130:101: C: Line is too long. [115/100]
flash[:error] = "Warning: Could not regrade #{failed_jobs} submission(s):<br>" + failed_list if failed_jobs > 0
^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:145:3: C: Assignment Branch Condition size for autogradeSubmissions is too high. [42.25/15]
def autogradeSubmissions(course, assessment, submissions)
^^^
app/controllers/assessment/autograde.rb:145:3: C: Cyclomatic complexity for autogradeSubmissions is too high. [12/6]
def autogradeSubmissions(course, assessment, submissions)
^^^
app/controllers/assessment/autograde.rb:145:3: C: Method has too many lines. [30/20]
def autogradeSubmissions(course, assessment, submissions)
^^^
app/controllers/assessment/autograde.rb:145:3: C: Perceived complexity for autogradeSubmissions is too high. [14/7]
def autogradeSubmissions(course, assessment, submissions)
^^^
app/controllers/assessment/autograde.rb:145:7: C: Use snake_case for method names.
def autogradeSubmissions(course, assessment, submissions)
^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:147:101: C: Line is too long. [116/100]
flash[:error] = "Submission could not be autograded due to an error in creation" && return if submissions.blank?
^^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:153:101: C: Line is too long. [101/100]
link = (view_context.link_to "Autograder Settings", [:edit, course, assessment, :autograder])
^
app/controllers/assessment/autograde.rb:167:101: C: Line is too long. [101/100]
link = (view_context.link_to "Autograder Settings", [:edit, course, assessment, :autograder])
^
app/controllers/assessment/autograde.rb:173:101: C: Line is too long. [104/100]
link = "<a href=\"#{url_for(controller: 'jobs', action: 'getjob', id: job)}\">Job ID = #{job}</a>"
^^^^
app/controllers/assessment/autograde.rb:184:3: C: Assignment Branch Condition size for tango_upload is too high. [35.86/15]
def tango_upload(course, assessment, submission, existing_files)
^^^
app/controllers/assessment/autograde.rb:184:3: C: Method has too many lines. [29/20]
def tango_upload(course, assessment, submission, existing_files)
^^^
app/controllers/assessment/autograde.rb:263:101: C: Line is too long. [132/100]
"#{hostname}/courses/#{course.name}/assessments/#{assessment.name}/autograde_done?dave=#{dave}&submission_id=#{submission.id}"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:280:3: C: Assignment Branch Condition size for tango_add_job is too high. [16.31/15]
def tango_add_job(course, assessment, upload_file_list, callback_url, job_name, output_file)
^^^
app/controllers/assessment/autograde.rb:280:20: C: Avoid parameter lists longer than 5 parameters.
def tango_add_job(course, assessment, upload_file_list, callback_url, job_name, output_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:303:3: C: Assignment Branch Condition size for tango_poll is too high. [18.87/15]
def tango_poll(course, assessment, submissions, output_file)
^^^
app/controllers/assessment/autograde.rb:303:3: C: Method has too many lines. [28/20]
def tango_poll(course, assessment, submissions, output_file)
^^^
app/controllers/assessment/autograde.rb:308:101: C: Line is too long. [104/100]
response = TangoClient.poll("#{course.name}-#{assessment.name}", "#{URI.encode(output_file)}")
^^^^
app/controllers/assessment/autograde.rb:346:3: C: Assignment Branch Condition size for sendJob is too high. [32.16/15]
def sendJob(course, assessment, submissions, cud)
^^^
app/controllers/assessment/autograde.rb:346:3: C: Cyclomatic complexity for sendJob is too high. [8/6]
def sendJob(course, assessment, submissions, cud)
^^^
app/controllers/assessment/autograde.rb:346:3: C: Method has too many lines. [24/20]
def sendJob(course, assessment, submissions, cud)
^^^
app/controllers/assessment/autograde.rb:346:3: C: Perceived complexity for sendJob is too high. [8/7]
def sendJob(course, assessment, submissions, cud)
^^^
app/controllers/assessment/autograde.rb:346:7: C: Use snake_case for method names.
def sendJob(course, assessment, submissions, cud)
^^^^^^^
app/controllers/assessment/autograde.rb:389:7: C: Use snake_case for method names.
def autogradeInputFiles(ass_dir, assessment, submission)
^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:415:7: C: Use snake_case for method names.
def autogradeDone(submissions, feedback)
^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:438:3: C: Assignment Branch Condition size for saveAutograde is too high. [66.77/15]
def saveAutograde(submissions, feedback)
^^^
app/controllers/assessment/autograde.rb:438:3: C: Cyclomatic complexity for saveAutograde is too high. [9/6]
def saveAutograde(submissions, feedback)
^^^
app/controllers/assessment/autograde.rb:438:3: C: Method has too many lines. [50/20]
def saveAutograde(submissions, feedback)
^^^
app/controllers/assessment/autograde.rb:438:3: C: Perceived complexity for saveAutograde is too high. [10/7]
def saveAutograde(submissions, feedback)
^^^
app/controllers/assessment/autograde.rb:438:7: C: Use snake_case for method names.
def saveAutograde(submissions, feedback)
^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:498:101: C: Line is too long. [112/100]
logger.add(Logger::INFO) { "#{submission.course_user_datum.email}, #{submission.version}, #{autoresult}" }
^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:507:7: C: Use snake_case for method names.
def parseAutoresult(autoresult, _isOfficial)
^^^^^^^^^^^^^^^
app/controllers/assessment/autograde.rb:514:3: C: Assignment Branch Condition size for extend_config_module is too high. [40.41/15]
def extend_config_module(assessment, submission, cud)
^^^
app/controllers/assessment/autograde.rb:514:3: C: Cyclomatic complexity for extend_config_module is too high. [7/6]
def extend_config_module(assessment, submission, cud)
^^^
app/controllers/assessment/autograde.rb:514:3: C: Method has too many lines. [42/20]
def extend_config_module(assessment, submission, cud)
^^^
app/controllers/assessment/grading.rb:4:1: C: Missing top-level module documentation comment.
module AssessmentGrading
^^^^^^
app/controllers/assessment/grading.rb:6:7: C: Use snake_case for method names.
def bulkExport
^^^^^^^^^^
app/controllers/assessment/grading.rb:11:22: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
timestamp = Time.now.strftime "%Y%m%d%H%M"
^^^
app/controllers/assessment/grading.rb:17:3: C: Assignment Branch Condition size for bulkGrade is too high. [25.96/15]
def bulkGrade
^^^
app/controllers/assessment/grading.rb:17:3: C: Cyclomatic complexity for bulkGrade is too high. [10/6]
def bulkGrade
^^^
app/controllers/assessment/grading.rb:17:3: C: Method has too many lines. [22/20]
def bulkGrade
^^^
app/controllers/assessment/grading.rb:17:3: C: Perceived complexity for bulkGrade is too high. [12/7]
def bulkGrade
^^^
app/controllers/assessment/grading.rb:17:7: C: Use snake_case for method names.
def bulkGrade
^^^^^^^^^
app/controllers/assessment/grading.rb:21:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if params[:upload]
^^
app/controllers/assessment/grading.rb:50:3: C: Assignment Branch Condition size for bulkGrade_complete is too high. [29.58/15]
def bulkGrade_complete
^^^
app/controllers/assessment/grading.rb:50:3: C: Cyclomatic complexity for bulkGrade_complete is too high. [12/6]
def bulkGrade_complete
^^^
app/controllers/assessment/grading.rb:50:3: C: Perceived complexity for bulkGrade_complete is too high. [13/7]
def bulkGrade_complete
^^^
app/controllers/assessment/grading.rb:50:7: C: Use snake_case for method names.
def bulkGrade_complete
^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:71:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
unless save_entries @entries, data_type
^^^^^^
app/controllers/assessment/grading.rb:88:7: C: Indent [33mwhen[0m as deep as [33mcase[0m.
when Hash
^^^^
app/controllers/assessment/grading.rb:96:3: C: Assignment Branch Condition size for save_entries is too high. [40.63/15]
def save_entries(entries, data_type)
^^^
app/controllers/assessment/grading.rb:96:3: C: Cyclomatic complexity for save_entries is too high. [8/6]
def save_entries(entries, data_type)
^^^
app/controllers/assessment/grading.rb:96:3: C: Method has too many lines. [43/20]
def save_entries(entries, data_type)
^^^
app/controllers/assessment/grading.rb:111:22: W: Assignment in condition - you probably meant to use [33m==[0m.
unless sub = aud.latest_submission
^
app/controllers/assessment/grading.rb:155:89: W: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND.
emails = Set.new(CourseUserDatum.joins(:user).where(course: @assessment.course).map &:email)
^
app/controllers/assessment/grading.rb:172:3: C: Assignment Branch Condition size for parse_csv_row is too high. [33.62/15]
def parse_csv_row(row, kind, problems, emails)
^^^
app/controllers/assessment/grading.rb:172:3: C: Cyclomatic complexity for parse_csv_row is too high. [10/6]
def parse_csv_row(row, kind, problems, emails)
^^^
app/controllers/assessment/grading.rb:172:3: C: Method has too many lines. [36/20]
def parse_csv_row(row, kind, problems, emails)
^^^
app/controllers/assessment/grading.rb:172:3: C: Perceived complexity for parse_csv_row is too high. [12/7]
def parse_csv_row(row, kind, problems, emails)
^^^
app/controllers/assessment/grading.rb:190:5: W: [33mend[0m at 190, 4 is not aligned with [33mif[0m at 184, 24
end
^^^
app/controllers/assessment/grading.rb:199:11: C: Avoid using [33mrescue[0m in its modifier form.
Float(datum) rescue({ error: datum })
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:219:5: W: [33mend[0m at 219, 4 is not aligned with [33mif[0m at 213, 29
end
^^^
app/controllers/assessment/grading.rb:226:3: C: Assignment Branch Condition size for quickSetScore is too high. [27.66/15]
def quickSetScore
^^^
app/controllers/assessment/grading.rb:226:7: C: Use snake_case for method names.
def quickSetScore
^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:255:3: C: Assignment Branch Condition size for quickSetScoreDetails is too high. [29.55/15]
def quickSetScoreDetails
^^^
app/controllers/assessment/grading.rb:255:7: C: Use snake_case for method names.
def quickSetScoreDetails
^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:291:15: C: Favor the ternary operator (?:) over if/then/else/end constructs.
grader = (if score then score.grader else nil end)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:291:42: C: Redundant [33melse[0m-clause.
grader = (if score then score.grader else nil end)
^^^^
app/controllers/assessment/grading.rb:299:7: C: Use snake_case for method names.
def viewGradesheet
^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:303:7: C: Use snake_case for method names.
def quickGetTotal
^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:312:3: C: Assignment Branch Condition size for statistics is too high. [41.05/15]
def statistics
^^^
app/controllers/assessment/grading.rb:312:3: C: Method has too many lines. [21/20]
def statistics
^^^
app/controllers/assessment/grading.rb:355:7: W: The use of [33meval[0m is a serious security risk.
eval("extend(Course#{course.camelize})")
^^^^
app/controllers/assessment/grading.rb:356:5: W: Avoid rescuing the [33mException[0m class. Perhaps you meant to rescue [33mStandardError[0m?
rescue Exception
^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:359:69: C: Use [33m&&[0m instead of [33mand[0m.
"admin/reload'>here</a> to reload the file, and try again") and
^^^
app/controllers/assessment/grading.rb:365:3: C: Assignment Branch Condition size for stats_for_grouping is too high. [37.39/15]
def stats_for_grouping(grouping)
^^^
app/controllers/assessment/grading.rb:365:3: C: Method has too many lines. [25/20]
def stats_for_grouping(grouping)
^^^
app/controllers/assessment/grading.rb:367:5: W: Useless assignment to variable - [33mproblem_id_to_name[0m.
problem_id_to_name = @assessment.problem_id_to_name
^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:407:3: C: Assignment Branch Condition size for stats_for_grader is too high. [52.33/15]
def stats_for_grader(submissions)
^^^
app/controllers/assessment/grading.rb:407:3: C: Method has too many lines. [48/20]
def stats_for_grader(submissions)
^^^
app/controllers/assessment/grading.rb:409:5: W: Useless assignment to variable - [33mproblem_id_to_name[0m.
problem_id_to_name = @assessment.problem_id_to_name
^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:467:3: C: Assignment Branch Condition size for load_gradesheet_data is too high. [17.12/15]
def load_gradesheet_data
^^^
app/controllers/assessment/grading.rb:468:19: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@start = Time.now
^^^
app/controllers/assessment/grading.rb:472:9: C: Avoid multi-line ?: (the ternary operator); use [33mif[0m/[33munless[0m instead.
o = params[:section] ? {
^^^^^^^^^^^^^^^^^^^^
app/controllers/assessment/grading.rb:480:47: W: Do not use prefix [33m_[0m for a variable that is used.
cache = AssociationCache.new(@course) do |_|
^
app/controllers/assessment/handin.rb:21:3: C: Assignment Branch Condition size for handin is too high. [21.12/15]
def handin
^^^
app/controllers/assessment/handin.rb:21:3: C: Cyclomatic complexity for handin is too high. [10/6]
def handin
^^^
app/controllers/assessment/handin.rb:21:3: C: Perceived complexity for handin is too high. [10/7]
def handin
^^^
app/controllers/assessment/handin.rb:49:3: C: Assignment Branch Condition size for local_submit is too high. [89.69/15]
def local_submit
^^^
app/controllers/assessment/handin.rb:49:3: C: Cyclomatic complexity for local_submit is too high. [31/6]
def local_submit
^^^
app/controllers/assessment/handin.rb:49:3: C: Method has too many lines. [71/20]
def local_submit
^^^
app/controllers/assessment/handin.rb:49:3: C: Perceived complexity for local_submit is too high. [34/7]
def local_submit
^^^
app/controllers/assessment/handin.rb:151:3: C: Assignment Branch Condition size for log_submit is too high. [77.76/15]
def log_submit
^^^
app/controllers/assessment/handin.rb:151:3: C: Cyclomatic complexity for log_submit is too high. [15/6]
def log_submit
^^^
app/controllers/assessment/handin.rb:151:3: C: Method has too many lines. [49/20]
def log_submit
^^^
app/controllers/assessment/handin.rb:151:3: C: Perceived complexity for log_submit is too high. [17/7]
def log_submit
^^^
app/controllers/assessment/handin.rb:178:5: W: The use of [33meval[0m is a serious security risk.
eval("extend #{mod_name.camelcase}")
^^^^
app/controllers/assessment/handin.rb:202:38: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
submission.created_at = Time.now
^^^
app/controllers/assessment/handin.rb:229:3: C: Assignment Branch Condition size for validateHandin is too high. [37.34/15]
def validateHandin
^^^
app/controllers/assessment/handin.rb:229:3: C: Method has too many lines. [21/20]
def validateHandin
^^^
app/controllers/assessment/handin.rb:229:7: C: Use snake_case for method names.
def validateHandin
^^^^^^^^^^^^^^
app/controllers/assessment/handin.rb:266:3: C: Assignment Branch Condition size for validate_for_groups is too high. [20.15/15]
def validate_for_groups
^^^
app/controllers/assessment/handin.rb:266:3: C: Cyclomatic complexity for validate_for_groups is too high. [7/6]
def validate_for_groups
^^^
app/controllers/assessment/handin.rb:295:3: C: Assignment Branch Condition size for saveHandin is too high. [27.73/15]
def saveHandin(sub)
^^^
app/controllers/assessment/handin.rb:295:3: C: Method has too many lines. [24/20]
def saveHandin(sub)
^^^
app/controllers/assessment/handin.rb:295:7: C: Use snake_case for method names.
def saveHandin(sub)
^^^^^^^^^^
app/controllers/assessment/handin.rb:324:3: C: Assignment Branch Condition size for set_handin is too high. [17.49/15]
def set_handin
^^^
app/controllers/assessment/handin.rb:328:51: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@can_submit, @why_not = @aud.can_submit? Time.now
^^^
app/controllers/assessment/handout.rb:13:3: C: Assignment Branch Condition size for handout is too high. [16.61/15]
def handout
^^^
app/controllers/assessment/svn.rb:25:3: C: Assignment Branch Condition size for import_svn is too high. [18.68/15]
def import_svn
^^^
app/controllers/assessment/svn.rb:53:3: C: Assignment Branch Condition size for svn_save_handin is too high. [27.82/15]
def svn_save_handin
^^^
app/controllers/assessment/svn.rb:53:3: C: Method has too many lines. [25/20]
def svn_save_handin
^^^
app/controllers/assessments_controller.rb:8:1: C: Class definition is too long. [583/100]
class AssessmentsController < ApplicationController
^^^^^
app/controllers/assessments_controller.rb:8:1: C: Missing top-level class documentation comment.
class AssessmentsController < ApplicationController
^^^^^
app/controllers/assessments_controller.rb:64:101: C: Line is too long. [166/100]
@announcements = Announcement.where("start_date<? and end_date>? and (course_id=? or system) and !persistent", Time.now, Time.now, @course.id).order("start_date")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:64:121: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@announcements = Announcement.where("start_date<? and end_date>? and (course_id=? or system) and !persistent", Time.now, Time.now, @course.id).order("start_date")
^^^
app/controllers/assessments_controller.rb:64:131: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@announcements = Announcement.where("start_date<? and end_date>? and (course_id=? or system) and !persistent", Time.now, Time.now, @course.id).order("start_date")
^^^
app/controllers/assessments_controller.rb:65:101: C: Line is too long. [103/100]
@attachments = (@cud.instructor?) ? @course.attachments : @course.attachments.where(released: true)
^^^
app/controllers/assessments_controller.rb:78:3: C: Assignment Branch Condition size for installQuiz is too high. [52.76/15]
def installQuiz
^^^
app/controllers/assessments_controller.rb:78:3: C: Method has too many lines. [34/20]
def installQuiz
^^^
app/controllers/assessments_controller.rb:78:7: C: Use snake_case for method names.
def installQuiz
^^^^^^^^^^^
app/controllers/assessments_controller.rb:83:7: C: Use snake_case for variable names.
quizJSON = params[:quiz]
^^^^^^^^
app/controllers/assessments_controller.rb:84:7: C: Use snake_case for variable names.
quizDisplayName = params[:quizName]
^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:85:7: C: Use snake_case for variable names.
quizName = quizDisplayName.downcase.gsub(/[^a-z0-9]/, "")
^^^^^^^^
app/controllers/assessments_controller.rb:94:37: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.visible_at = Time.now
^^^
app/controllers/assessments_controller.rb:95:35: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.start_at = Time.now
^^^
app/controllers/assessments_controller.rb:96:33: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.due_at = Time.now
^^^
app/controllers/assessments_controller.rb:97:43: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.grading_deadline = Time.now
^^^
app/controllers/assessments_controller.rb:98:33: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.end_at = Time.now
^^^
app/controllers/assessments_controller.rb:101:101: C: Line is too long. [101/100]
@assessment.max_submissions = params.include?(:max_submissions) ? params[:max_submissions] : -1
^
app/controllers/assessments_controller.rb:107:7: C: Use snake_case for variable names.
quizData = JSON.parse(quizJSON)
^^^^^^^^
app/controllers/assessments_controller.rb:123:3: C: Assignment Branch Condition size for takeQuiz is too high. [16.03/15]
def takeQuiz
^^^
app/controllers/assessments_controller.rb:123:7: C: Use snake_case for method names.
def takeQuiz
^^^^^^^^
app/controllers/assessments_controller.rb:129:5: C: Use snake_case for variable names.
@quizData = JSON.parse(@assessment.quizData)
^^^^^^^^^
app/controllers/assessments_controller.rb:130:5: C: Use snake_case for variable names.
@submitPath = submitQuiz_course_assessment_path(@course, @assessment)
^^^^^^^^^^^
app/controllers/assessments_controller.rb:135:3: C: Assignment Branch Condition size for submitQuiz is too high. [36.24/15]
def submitQuiz
^^^
app/controllers/assessments_controller.rb:135:3: C: Cyclomatic complexity for submitQuiz is too high. [7/6]
def submitQuiz
^^^
app/controllers/assessments_controller.rb:135:3: C: Method has too many lines. [23/20]
def submitQuiz
^^^
app/controllers/assessments_controller.rb:135:7: C: Use snake_case for method names.
def submitQuiz
^^^^^^^^^^
app/controllers/assessments_controller.rb:141:5: C: Use snake_case for variable names.
@quizData = JSON.parse(@assessment.quizData)
^^^^^^^^^
app/controllers/assessments_controller.rb:145:7: C: Use snake_case for variable names.
actualAnswer = @quizData[i]["answer"]
^^^^^^^^^^^^
app/controllers/assessments_controller.rb:151:5: C: Use snake_case for variable names.
quizScore = Score.new(score: score,
^^^^^^^^^
app/controllers/assessments_controller.rb:166:7: C: Use snake_case for method names.
def installAssessment
^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:182:3: C: Assignment Branch Condition size for importAsmtFromTar is too high. [66.68/15]
def importAsmtFromTar
^^^
app/controllers/assessments_controller.rb:182:3: C: Cyclomatic complexity for importAsmtFromTar is too high. [12/6]
def importAsmtFromTar
^^^
app/controllers/assessments_controller.rb:182:3: C: Method has too many lines. [53/20]
def importAsmtFromTar
^^^
app/controllers/assessments_controller.rb:182:3: C: Perceived complexity for importAsmtFromTar is too high. [13/7]
def importAsmtFromTar
^^^
app/controllers/assessments_controller.rb:182:7: C: Use snake_case for method names.
def importAsmtFromTar
^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:183:5: C: Use snake_case for variable names.
tarFile = params["tarFile"]
^^^^^^^
app/controllers/assessments_controller.rb:191:7: C: Use snake_case for variable names.
tarFile = File.new(tarFile.open, "rb")
^^^^^^^
app/controllers/assessments_controller.rb:209:101: C: Line is too long. [116/100]
flash[:error] = "An assessment with the same name already exists for the course. Please use a different name."
^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:248:7: C: Use snake_case for method names.
def importAssessment
^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:259:3: C: Assignment Branch Condition size for create is too high. [54.78/15]
def create
^^^
app/controllers/assessments_controller.rb:259:3: C: Cyclomatic complexity for create is too high. [8/6]
def create
^^^
app/controllers/assessments_controller.rb:259:3: C: Method has too many lines. [44/20]
def create
^^^
app/controllers/assessments_controller.rb:259:3: C: Perceived complexity for create is too high. [8/7]
def create
^^^
app/controllers/assessments_controller.rb:280:35: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.visible_at = Time.now
^^^
app/controllers/assessments_controller.rb:281:33: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.start_at = Time.now
^^^
app/controllers/assessments_controller.rb:282:31: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.due_at = Time.now
^^^
app/controllers/assessments_controller.rb:283:41: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.grading_deadline = Time.now
^^^
app/controllers/assessments_controller.rb:284:31: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@assessment.end_at = Time.now
^^^
app/controllers/assessments_controller.rb:321:3: C: Assignment Branch Condition size for assessmentInitialize is too high. [16.4/15]
def assessmentInitialize(assignName)
^^^
app/controllers/assessments_controller.rb:321:7: C: Use snake_case for method names.
def assessmentInitialize(assignName)
^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:347:3: C: Assignment Branch Condition size for installProblems is too high. [16.28/15]
def installProblems
^^^
app/controllers/assessments_controller.rb:347:7: C: Use snake_case for method names.
def installProblems
^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:378:3: C: Assignment Branch Condition size for grade is too high. [19.95/15]
def grade
^^^
app/controllers/assessments_controller.rb:383:7: C: Use snake_case for variable names.
subFile = File.join(Rails.root, "courses",
^^^^^^^
app/controllers/assessments_controller.rb:387:7: C: Use snake_case for variable names.
@submissionData = File.read(subFile)
^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:389:7: C: Use snake_case for variable names.
@submissionData = "Could not read #{subFile}"
^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:394:7: C: Use snake_case for method names.
def getAssessmentVariable(key)
^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:405:3: C: Assignment Branch Condition size for export is too high. [47.61/15]
def export
^^^
app/controllers/assessments_controller.rb:405:3: C: Method has too many lines. [31/20]
def export
^^^
app/controllers/assessments_controller.rb:412:7: C: Use snake_case for variable names.
tarStream = StringIO.new("")
^^^^^^^^^
app/controllers/assessments_controller.rb:417:37: C: Use [33m%r[0m around regular expression.
relative_path = file.sub((/^#{Regexp.escape base_path}\/?/), "")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:421:101: C: Line is too long. [101/100]
elsif !relative_path.starts_with? File.join(@assessment.name, @assessment.handin_directory)
^
app/controllers/assessments_controller.rb:430:98: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
send_data tarStream.string.force_encoding("binary"), filename: "#{@assessment.name}_#{Time.now.strftime('%Y%m%d')}.tar", content_type: "application/x-tar"
^^^
app/controllers/assessments_controller.rb:430:101: C: Line is too long. [160/100]
send_data tarStream.string.force_encoding("binary"), filename: "#{@assessment.name}_#{Time.now.strftime('%Y%m%d')}.tar", content_type: "application/x-tar"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:444:5: C: Prefer [33meach[0m over [33mfor[0m.
for submission in @assessment.submissions do
^^^
app/controllers/assessments_controller.rb:448:5: C: Prefer [33meach[0m over [33mfor[0m.
for attachment in @assessment.attachments do
^^^
app/controllers/assessments_controller.rb:459:3: C: Assignment Branch Condition size for show is too high. [51.89/15]
def show
^^^
app/controllers/assessments_controller.rb:459:3: C: Cyclomatic complexity for show is too high. [7/6]
def show
^^^
app/controllers/assessments_controller.rb:459:3: C: Method has too many lines. [40/20]
def show
^^^
app/controllers/assessments_controller.rb:459:3: C: Perceived complexity for show is too high. [8/7]
def show
^^^
app/controllers/assessments_controller.rb:476:5: C: Use snake_case for variable names.
@startTime = Time.now
^^^^^^^^^^
app/controllers/assessments_controller.rb:476:23: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@startTime = Time.now
^^^
app/controllers/assessments_controller.rb:478:7: C: Use snake_case for variable names.
@effectiveCud = @course.course_user_data.find(params[:cud_id])
^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:480:7: C: Use snake_case for variable names.
@effectiveCud = @cud
^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:482:101: C: Line is too long. [110/100]
@submissions = @assessment.submissions.where(course_user_datum_id: @effectiveCud.id).order("version DESC")
^^^^^^^^^^
app/controllers/assessments_controller.rb:498:5: C: Prefer [33meach[0m over [33mfor[0m.
for result in results do
^^^
app/controllers/assessments_controller.rb:499:7: C: Use snake_case for variable names.
subId = result["submission_id"].to_i
^^^^^
app/controllers/assessments_controller.rb:515:3: C: Assignment Branch Condition size for history is too high. [47.1/15]
def history
^^^
app/controllers/assessments_controller.rb:515:3: C: Cyclomatic complexity for history is too high. [8/6]
def history
^^^
app/controllers/assessments_controller.rb:515:3: C: Method has too many lines. [35/20]
def history
^^^
app/controllers/assessments_controller.rb:515:3: C: Perceived complexity for history is too high. [9/7]
def history
^^^
app/controllers/assessments_controller.rb:519:5: C: Use snake_case for variable names.
@startTime = Time.now
^^^^^^^^^^
app/controllers/assessments_controller.rb:519:23: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@startTime = Time.now
^^^
app/controllers/assessments_controller.rb:521:7: C: Use snake_case for variable names.
@effectiveCud = @course.course_user_data.find(params[:cud_id])
^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:523:7: C: Use snake_case for variable names.
@effectiveCud = @cud
^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:525:101: C: Line is too long. [110/100]
@submissions = @assessment.submissions.where(course_user_datum_id: @effectiveCud.id).order("version DESC")
^^^^^^^^^^
app/controllers/assessments_controller.rb:541:5: C: Prefer [33meach[0m over [33mfor[0m.
for result in results do
^^^
app/controllers/assessments_controller.rb:542:7: C: Use snake_case for variable names.
subId = result["submission_id"].to_i
^^^^^
app/controllers/assessments_controller.rb:556:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if params[:partial]
^^
app/controllers/assessments_controller.rb:563:7: C: Use snake_case for method names.
def viewFeedback
^^^^^^^^^^^^
app/controllers/assessments_controller.rb:569:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if Archive.archive? @submission.handin_file_path
^^
app/controllers/assessments_controller.rb:577:3: W: Do not suppress exceptions.
rescue StandardError => @error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:607:7: C: Use snake_case for method names.
def releaseAllGrades
^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:612:43: C: Favor [33mformat[0m over [33mString#%[0m.
flash[:success] = "%d %s released." % [num_released, (num_released > 1 ? "grades were" : "grade was")]
^
app/controllers/assessments_controller.rb:612:101: C: Line is too long. [108/100]
flash[:success] = "%d %s released." % [num_released, (num_released > 1 ? "grades were" : "grade was")]
^^^^^^^^
app/controllers/assessments_controller.rb:620:3: C: Assignment Branch Condition size for releaseSectionGrades is too high. [22.83/15]
def releaseSectionGrades
^^^
app/controllers/assessments_controller.rb:620:3: C: Cyclomatic complexity for releaseSectionGrades is too high. [7/6]
def releaseSectionGrades
^^^
app/controllers/assessments_controller.rb:620:3: C: Perceived complexity for releaseSectionGrades is too high. [8/7]
def releaseSectionGrades
^^^
app/controllers/assessments_controller.rb:620:7: C: Use snake_case for method names.
def releaseSectionGrades
^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:622:101: C: Line is too long. [110/100]
flash[:error] = "You haven't been assigned to a lecture and/or section. Please contact your instructor."
^^^^^^^^^^
app/controllers/assessments_controller.rb:627:101: C: Line is too long. [101/100]
num_released = releaseMatchingGrades { |submission, _| @cud.CA_of? submission.course_user_datum }
^
app/controllers/assessments_controller.rb:630:43: C: Favor [33mformat[0m over [33mString#%[0m.
flash[:success] = "%d %s released." % [num_released, (num_released > 1 ? "grades were" : "grade was")]
^
app/controllers/assessments_controller.rb:630:101: C: Line is too long. [108/100]
flash[:success] = "%d %s released." % [num_released, (num_released > 1 ? "grades were" : "grade was")]
^^^^^^^^
app/controllers/assessments_controller.rb:633:101: C: Line is too long. [102/100]
"Either they were all already released or you might be assigned to a lecture " \
^^
app/controllers/assessments_controller.rb:640:7: C: Use snake_case for method names.
def withdrawAllGrades
^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:683:7: C: Use snake_case for method names.
def updateScore(_user, score)
^^^^^^^^^^^
app/controllers/assessments_controller.rb:689:7: C: Use snake_case for method names.
def loadHandinPage
^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:692:3: C: Assignment Branch Condition size for releaseMatchingGrades is too high. [15.94/15]
def releaseMatchingGrades
^^^
app/controllers/assessments_controller.rb:692:7: C: Use snake_case for method names.
def releaseMatchingGrades
^^^^^^^^^^^^^^^^^^^^^
app/controllers/assessments_controller.rb:731:3: C: Assignment Branch Condition size for edit_assessment_params is too high. [27.91/15]
def edit_assessment_params
^^^
app/controllers/assessments_controller.rb:731:3: C: Cyclomatic complexity for edit_assessment_params is too high. [8/6]
def edit_assessment_params
^^^
app/controllers/assessments_controller.rb:731:3: C: Perceived complexity for edit_assessment_params is too high. [8/7]
def edit_assessment_params
^^^
app/controllers/assessments_controller.rb:749:3: C: Assignment Branch Condition size for valid_asmt_tar is too high. [15.17/15]
def valid_asmt_tar(tar_extract)
^^^
app/controllers/assessments_controller.rb:749:3: C: Cyclomatic complexity for valid_asmt_tar is too high. [10/6]
def valid_asmt_tar(tar_extract)
^^^
app/controllers/assessments_controller.rb:749:3: C: Perceived complexity for valid_asmt_tar is too high. [11/7]
def valid_asmt_tar(tar_extract)
^^^
app/controllers/attachments_controller.rb:33:3: C: Assignment Branch Condition size for show is too high. [16.79/15]
def show
^^^
app/controllers/attachments_controller.rb:52:3: C: Cyclomatic complexity for update is too high. [8/6]
def update
^^^
app/controllers/attachments_controller.rb:52:3: C: Perceived complexity for update is too high. [11/7]
def update
^^^
app/controllers/course_user_data_controller.rb:1:1: C: Class definition is too long. [188/100]
class CourseUserDataController < ApplicationController
^^^^^
app/controllers/course_user_data_controller.rb:1:1: C: Missing top-level class documentation comment.
class CourseUserDataController < ApplicationController
^^^^^
app/controllers/course_user_data_controller.rb:6:5: C: Use snake_case for variable names.
@requestedUser = @cud
^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:12:5: C: Use snake_case for variable names.
@newCUD = @course.course_user_data.new
^^^^^^^
app/controllers/course_user_data_controller.rb:18:3: C: Assignment Branch Condition size for create is too high. [37.7/15]
def create
^^^
app/controllers/course_user_data_controller.rb:18:3: C: Cyclomatic complexity for create is too high. [11/6]
def create
^^^
app/controllers/course_user_data_controller.rb:18:3: C: Method has too many lines. [33/20]
def create
^^^
app/controllers/course_user_data_controller.rb:18:3: C: Perceived complexity for create is too high. [15/7]
def create
^^^
app/controllers/course_user_data_controller.rb:20:5: C: Use snake_case for variable names.
@newCUD = @course.course_user_data.new(cud_parameters)
^^^^^^^
app/controllers/course_user_data_controller.rb:63:5: C: Use snake_case for variable names.
@requestedUser = @cud.course.course_user_data.find(params[:id])
^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:75:3: C: Assignment Branch Condition size for edit is too high. [21.93/15]
def edit
^^^
app/controllers/course_user_data_controller.rb:75:3: C: Cyclomatic complexity for edit is too high. [7/6]
def edit
^^^
app/controllers/course_user_data_controller.rb:76:5: C: Use snake_case for variable names.
@editCUD = @course.course_user_data.find(params[:id])
^^^^^^^^
app/controllers/course_user_data_controller.rb:92:3: C: Assignment Branch Condition size for update is too high. [45.02/15]
def update
^^^
app/controllers/course_user_data_controller.rb:92:3: C: Cyclomatic complexity for update is too high. [14/6]
def update
^^^
app/controllers/course_user_data_controller.rb:92:3: C: Method has too many lines. [29/20]
def update
^^^
app/controllers/course_user_data_controller.rb:92:3: C: Perceived complexity for update is too high. [17/7]
def update
^^^
app/controllers/course_user_data_controller.rb:96:5: C: Use snake_case for variable names.
@editCUD = @course.course_user_data.find(params[:id])
^^^^^^^^
app/controllers/course_user_data_controller.rb:134:3: C: Cyclomatic complexity for destroy is too high. [7/6]
def destroy
^^^
app/controllers/course_user_data_controller.rb:135:5: C: Use snake_case for variable names.
@destroyCUD = @course.course_user_data.find(params[:id])
^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:146:7: C: Use snake_case for method names.
def destroyConfirm
^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:147:5: C: Use snake_case for variable names.
@destroyCUD = @course.course_user_data.find(params[:id])
^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:151:3: C: Assignment Branch Condition size for sudo is too high. [59.47/15]
def sudo
^^^
app/controllers/course_user_data_controller.rb:151:3: C: Cyclomatic complexity for sudo is too high. [14/6]
def sudo
^^^
app/controllers/course_user_data_controller.rb:151:3: C: Method has too many lines. [26/20]
def sudo
^^^
app/controllers/course_user_data_controller.rb:151:3: C: Perceived complexity for sudo is too high. [14/7]
def sudo
^^^
app/controllers/course_user_data_controller.rb:198:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if @cud.instructor
^^
app/controllers/course_user_data_controller.rb:206:101: C: Line is too long. [120/100]
:lecture, :section, :instructor, :dropped, :nickname, :course_assistant,
^^^^^^^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:211:101: C: Line is too long. [120/100]
:lecture, :section, :instructor, :dropped, :nickname, :course_assistant,
^^^^^^^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:223:101: C: Line is too long. [120/100]
:lecture, :section, :instructor, :dropped, :nickname, :course_assistant,
^^^^^^^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:224:101: C: Line is too long. [104/100]
user_attributes: [:id, :email, :first_name, :last_name],
^^^^
app/controllers/course_user_data_controller.rb:228:101: C: Line is too long. [120/100]
:lecture, :section, :instructor, :dropped, :nickname, :course_assistant,
^^^^^^^^^^^^^^^^^^^^
app/controllers/course_user_data_controller.rb:229:101: C: Line is too long. [104/100]
user_attributes: [:id, :email, :first_name, :last_name],
^^^^
app/controllers/course_user_data_controller.rb:232:101: C: Line is too long. [104/100]
params.require(:course_user_datum).permit(:nickname) # user_attributes: [:first_name, :last_name])
^^^^
app/controllers/courses_controller.rb:6:1: C: Class definition is too long. [524/100]
class CoursesController < ApplicationController
^^^^^
app/controllers/courses_controller.rb:6:1: C: Missing top-level class documentation comment.
class CoursesController < ApplicationController
^^^^^
app/controllers/courses_controller.rb:33:3: C: Assignment Branch Condition size for manage is too high. [22.89/15]
def manage
^^^
app/controllers/courses_controller.rb:70:5: C: Use snake_case for variable names.
@newCourse = Course.new
^^^^^^^^^^
app/controllers/courses_controller.rb:75:3: C: Assignment Branch Condition size for create is too high. [66.29/15]
def create
^^^
app/controllers/courses_controller.rb:75:3: C: Cyclomatic complexity for create is too high. [13/6]
def create
^^^
app/controllers/courses_controller.rb:75:3: C: Method has too many lines. [49/20]
def create
^^^
app/controllers/courses_controller.rb:75:3: C: Perceived complexity for create is too high. [16/7]
def create
^^^
app/controllers/courses_controller.rb:82:5: C: Use snake_case for variable names.
@newCourse = Course.new(new_course_params)
^^^^^^^^^^
app/controllers/courses_controller.rb:88:34: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@newCourse.start_date = Time.now
^^^
app/controllers/courses_controller.rb:89:32: C: Do not use [33mTime.[:now][0m without zone. Use [33m#Time.zone.[:now][0m instead.
@newCourse.end_date = Time.now
^^^
app/controllers/courses_controller.rb:107:9: W: Avoid rescuing the [33mException[0m class. Perhaps you meant to rescue [33mStandardError[0m?
rescue Exception => e
^^^^^^^^^^^^^^^^^^^^^
app/controllers/courses_controller.rb:114:7: C: Use snake_case for variable names.
newCUD = @newCourse.course_user_data.new
^^^^^^
app/controllers/courses_controller.rb:158:3: C: Assignment Branch Condition size for destroy is too high. [19.67/15]
def destroy
^^^
app/controllers/courses_controller.rb:178:5: C: Use a guard clause instead of wrapping the code inside a conditional expression.
if request.post?
^^
app/controllers/courses_controller.rb:191:3: C: Assignment Branch Condition size for userLookup is too high. [17.58/15]
def userLookup
^^^
app/controllers/courses_controller.rb:191:7: C: Use snake_case for method names.
def userLookup
^^^^^^^^^^
app/controllers/courses_controller.rb:213:101: C: Line is too long. [135/100]
@cuds = @course.course_user_data.joins(:user).order("users.email ASC").where(CourseUserDatum.conditions_by_like(params[:search]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
app/controllers/courses_controller.rb:235:3: C: Assignment Branch Condition size for uploadRoster is too high. [21.21/15]
def uploadRoster
^^^
app/controllers/courses_controller.rb:235:3: C: Cyclomatic complexity for uploadRoster is too high. [8/6]
def uploadRoster
^^^
app/controllers/courses_controller.rb:235:3: C: Perceived complexity for uploadRoster is too high. [9/7]
def uploadRoster
^^^
app/controllers/courses_controller.rb:235:7: C: Use snake_case for method names.
def uploadRoster
^^^^^^^^^^^^
app/controllers/courses_controller.rb:247:7: W: Avoid rescuing the [33mException[0m class. Perhaps you meant to rescue [33mStandardError[0m?
rescue Exception => e
^^^^^^^^^^^^^^^^^^^^^
app/controllers/courses_controller.rb:258:3: C: Assignment Branch Condition size for downloadRoster is too high. [16.19/15]
def downloadRoster