-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-go.txt
1131 lines (830 loc) · 33 KB
/
run-tests-go.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
Running automated test file(s):
Go packages: linkedlist
===============================================================================
Running: ../../.github/citools/go/go-lint-golangci-lint
Running GoLangCi-Lint
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.020s
user 0m0.010s
sys 0m0.016s
==============================================================================
Running: golangci-lint run --enable-all ./...
level=warning msg="[runner] The linter 'golint' is deprecated (since v1.41.0) due to: The repository of the linter has been archived by the owner. Replaced by revive."
level=warning msg="[runner] The linter 'exhaustivestruct' is deprecated (since v1.46.0) due to: The owner seems to have abandoned the linter. Replaced by exhaustruct."
level=warning msg="[runner] The linter 'structcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'scopelint' is deprecated (since v1.39.0) due to: The repository of the linter has been deprecated by the owner. Replaced by exportloopref."
level=warning msg="[runner] The linter 'varcheck' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'nosnakecase' is deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming)."
level=warning msg="[runner] The linter 'interfacer' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. "
level=warning msg="[runner] The linter 'deadcode' is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused."
level=warning msg="[runner] The linter 'maligned' is deprecated (since v1.38.0) due to: The repository of the linter has been archived by the owner. Replaced by govet 'fieldalignment'."
level=warning msg="[runner] The linter 'ifshort' is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner. "
simple_linked_list_test.go:134:10: Error return value of `list.Pop` is not checked (errcheck)
list.Pop()
^
simple_linked_list_test.go:137:10: Error return value of `list.Pop` is not checked (errcheck)
list.Pop()
^
simple_linked_list.go:105:3: assignments should only be cuddled with other assignments (wsl)
e = l.Next()
^
simple_linked_list.go:132:3: append only allowed to cuddle with appended value (wsl)
slice = append(slice, e.data)
^
simple_linked_list_examples_test.go:41:3: assignments should only be cuddled with other assignments (wsl)
n = list.Next()
^
simple_linked_list_test.go:15:2: assignments should only be cuddled with other assignments (wsl)
list = New(nil)
^
simple_linked_list_test.go:16:2: only one cuddle assignment allowed before if statement (wsl)
if size := list.Size(); size != 0 {
^
simple_linked_list_test.go:65:2: only one cuddle assignment allowed before if statement (wsl)
if array := list.Array(); len(array) != 0 {
^
simple_linked_list_test.go:74:2: only one cuddle assignment allowed before if statement (wsl)
if !reflect.DeepEqual(array, expected) {
^
simple_linked_list_test.go:96:2: if statements should only be cuddled with assignments (wsl)
if elem != 3 {
^
simple_linked_list_test.go:170:2: for statements should only be cuddled with assignments used in the iteration (wsl)
for i := 0; i < b.N; i++ {
^
simple_linked_list_test.go:180:2: only cuddled expressions if assigning variable or using from line above (wsl)
b.ResetTimer()
^
simple_linked_list_test.go:181:2: only one cuddle assignment allowed before for statement (wsl)
for i := 0; i < b.N; i++ {
^
simple_linked_list_test.go:193:3: only cuddled expressions if assigning variable or using from line above (wsl)
b.StartTimer()
^
simple_linked_list_test.go:194:3: only one cuddle assignment allowed before for statement (wsl)
for k := 0; k < 1000; k++ {
^
simple_linked_list_test.go:190:2: for statements should only be cuddled with assignments used in the iteration (wsl)
for i := 0; i < b.N; i++ {
^
simple_linked_list_test.go:207:3: only one cuddle assignment allowed before for statement (wsl)
for k := 0; k < 1000; k++ {
^
simple_linked_list_test.go:204:2: for statements should only be cuddled with assignments used in the iteration (wsl)
for i := 0; i < b.N; i++ {
^
simple_linked_list_test.go:222:2: only cuddled expressions if assigning variable or using from line above (wsl)
b.ResetTimer()
^
simple_linked_list.go:141:11: head, tail, curr, size are missing in List (exhaustivestruct)
return &List{}
^
simple_linked_list_test.go:8:5: array1To10 is a global variable (gochecknoglobals)
var array1To10 = []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
^
simple_linked_list.go:89:13: err113: do not define dynamic errors, use wrapped static errors instead: "errors.New(\"can't pop an element from an empty list\")" (goerr113)
return 0, errors.New("can't pop an element from an empty list")
^
simple_linked_list.go:125:2: variable 'e' is only used in the if-statement (simple_linked_list.go:127:2); consider using short syntax (ifshort)
e := l.Next()
^
simple_linked_list_test.go:73:2: variable 'array' is only used in the if-statement (simple_linked_list_test.go:74:2); consider using short syntax (ifshort)
array := list.Array()
^
simple_linked_list_test.go:100:2: variable 'expected' is only used in the if-statement (simple_linked_list_test.go:101:2); consider using short syntax (ifshort)
expected := []int{1, 2}
^
simple_linked_list_test.go:125:2: variable 'actual' is only used in the if-statement (simple_linked_list_test.go:127:2); consider using short syntax (ifshort)
actual := list.Array()
^
simple_linked_list_test.go:126:2: variable 'expected' is only used in the if-statement (simple_linked_list_test.go:127:2); consider using short syntax (ifshort)
expected := []int{1, 2, 3, 4}
^
simple_linked_list_test.go:139:2: variable 'actual' is only used in the if-statement (simple_linked_list_test.go:141:2); consider using short syntax (ifshort)
actual := list.Array()
^
simple_linked_list_test.go:140:2: variable 'expected' is only used in the if-statement (simple_linked_list_test.go:141:2); consider using short syntax (ifshort)
expected := []int{1, 2, 4, 6}
^
simple_linked_list_test.go:160:2: variable 'expected' is only used in the if-statement (simple_linked_list_test.go:161:2); consider using short syntax (ifshort)
expected := []int{3, 2, 1}
^
simple_linked_list_examples_test.go:5:6: ExampleList_new contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_new() {
^
simple_linked_list_examples_test.go:20:6: ExampleList_size contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_size() {
^
simple_linked_list_examples_test.go:31:6: ExampleList_next contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_next() {
^
simple_linked_list_examples_test.go:52:6: ExampleList_push contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_push() {
^
simple_linked_list_examples_test.go:86:6: ExampleList_pop contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_pop() {
^
simple_linked_list_examples_test.go:126:6: ExampleList_array contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_array() {
^
simple_linked_list_examples_test.go:138:6: ExampleList_reverse contains underscore. You should use mixedCap or MixedCap. (nosnakecase)
func ExampleList_reverse() {
^
simple_linked_list_test.go:10:1: Function TestEmptyListHasSizeZero missing the call to method parallel (paralleltest)
func TestEmptyListHasSizeZero(t *testing.T) {
^
simple_linked_list_test.go:21:1: Function TestSingletonListHasSizeOne missing the call to method parallel (paralleltest)
func TestSingletonListHasSizeOne(t *testing.T) {
^
simple_linked_list_test.go:28:1: Function TestNonEmptyListHasCorrectSize missing the call to method parallel (paralleltest)
func TestNonEmptyListHasCorrectSize(t *testing.T) {
^
simple_linked_list_test.go:35:1: Function TestListHasCorrectSizeAfterPop missing the call to method parallel (paralleltest)
func TestListHasCorrectSizeAfterPop(t *testing.T) {
^
simple_linked_list_test.go:47:1: Function TestListHasCorrectSizeAfterPush missing the call to method parallel (paralleltest)
func TestListHasCorrectSizeAfterPush(t *testing.T) {
^
simple_linked_list_test.go:59:1: Function TestEmptyListToEmptyArray missing the call to method parallel (paralleltest)
func TestEmptyListToEmptyArray(t *testing.T) {
^
simple_linked_list_test.go:70:1: Function TestNonEmptyListToArray missing the call to method parallel (paralleltest)
func TestNonEmptyListToArray(t *testing.T) {
^
simple_linked_list_test.go:79:1: Function TestPopFromEmptyList missing the call to method parallel (paralleltest)
func TestPopFromEmptyList(t *testing.T) {
^
simple_linked_list_test.go:90:1: Function TestPopFromNonEmptyList missing the call to method parallel (paralleltest)
func TestPopFromNonEmptyList(t *testing.T) {
^
simple_linked_list_test.go:106:1: Function TestPushToEmptyList missing the call to method parallel (paralleltest)
func TestPushToEmptyList(t *testing.T) {
^
simple_linked_list_test.go:122:1: Function TestPushToNonEmptyList missing the call to method parallel (paralleltest)
func TestPushToNonEmptyList(t *testing.T) {
^
simple_linked_list_test.go:132:1: Function TestPushAndPop missing the call to method parallel (paralleltest)
func TestPushAndPop(t *testing.T) {
^
simple_linked_list_test.go:146:1: Function TestReverseEmptyList missing the call to method parallel (paralleltest)
func TestReverseEmptyList(t *testing.T) {
^
simple_linked_list_test.go:157:1: Function TestReverseNonEmptyList missing the call to method parallel (paralleltest)
func TestReverseNonEmptyList(t *testing.T) {
^
simple_linked_list_examples_test.go:1:9: package should be `linkedlist_test` instead of `linkedlist` (testpackage)
package linkedlist
^
simple_linked_list_test.go:1:9: package should be `linkedlist_test` instead of `linkedlist` (testpackage)
package linkedlist
^
simple_linked_list_examples_test.go:93:2: variable name 'd' is too short for the scope of its usage (varnamelen)
d, e := list.Pop()
^
simple_linked_list.go:99:2: variable name 'e' is too short for the scope of its usage (varnamelen)
e := l.Next()
^
simple_linked_list_examples_test.go:53:2: variable name 'l1' is too short for the scope of its usage (varnamelen)
l1 := List{
^
real 0m0.549s
user 0m0.878s
sys 0m0.517s
==============================================================================
Exit code: -1
real 0m0.582s
user 0m0.894s
sys 0m0.544s
real 0m0.584s
user 0m0.895s
sys 0m0.546s
===============================================================================
Running: ../../.github/citools/go/go-lint-revive
Running Go Lint Revive
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.026s
user 0m0.014s
sys 0m0.018s
==============================================================================
Running: revive -formatter=stylish ./...
real 0m0.064s
user 0m0.037s
sys 0m0.043s
==============================================================================
Exit code: 0
real 0m0.101s
user 0m0.059s
sys 0m0.068s
real 0m0.103s
user 0m0.061s
sys 0m0.069s
===============================================================================
Running: ../../.github/citools/go/go-lint-ineffassign
../run-tests: line 41: .github/citools/go/go-lint-ineffassign: No such file or directory
real 0m0.001s
user 0m0.000s
sys 0m0.000s
===============================================================================
Running: ../../.github/citools/go/go-lint-go-consistent
Running Go go-consistent
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.022s
user 0m0.012s
sys 0m0.014s
==============================================================================
Running: go-consistent -v ./...
info: check "./."
internal error: package "errors" without types was imported from "linkedlist"
real 0m0.090s
user 0m0.139s
sys 0m0.098s
==============================================================================
Exit code: -1
real 0m0.124s
user 0m0.155s
sys 0m0.123s
real 0m0.126s
user 0m0.155s
sys 0m0.125s
===============================================================================
Running: ../../.github/citools/go/go-lint-staticcheck
Running Go StaticCheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.017s
user 0m0.009s
sys 0m0.015s
==============================================================================
Running: staticcheck -checks=all ./...
real 0m0.179s
user 0m0.216s
sys 0m0.132s
==============================================================================
Exit code: 0
real 0m0.208s
user 0m0.233s
sys 0m0.155s
real 0m0.209s
user 0m0.233s
sys 0m0.156s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocritic
Running Go gocritic
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.020s
user 0m0.011s
sys 0m0.015s
==============================================================================
Running: gocritic check -enableAll ./...
real 0m0.844s
user 0m2.121s
sys 0m0.263s
==============================================================================
Exit code: 0
real 0m0.876s
user 0m2.138s
sys 0m0.288s
real 0m0.879s
user 0m2.138s
sys 0m0.290s
===============================================================================
Running: ../../.github/citools/go/go-lint-go_vet
Running Go Vet
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.023s
user 0m0.013s
sys 0m0.016s
==============================================================================
Running: go vet ./...
real 0m0.074s
user 0m0.105s
sys 0m0.098s
==============================================================================
Exit code: 0
real 0m0.112s
user 0m0.126s
sys 0m0.124s
real 0m0.114s
user 0m0.128s
sys 0m0.124s
===============================================================================
Running: ../../.github/citools/go/go-fixer-go_fix
Running go fix
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.018s
user 0m0.010s
sys 0m0.013s
==============================================================================
Running: go fix ./...
real 0m0.034s
user 0m0.022s
sys 0m0.021s
==============================================================================
Exit code: 0
real 0m0.062s
user 0m0.034s
sys 0m0.046s
real 0m0.064s
user 0m0.034s
sys 0m0.047s
===============================================================================
Running: ../../.github/citools/go/go-lint-errcheck
Running Go errcheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.040s
user 0m0.021s
sys 0m0.035s
==============================================================================
Running: errcheck ./...
simple_linked_list_test.go:134:10: list.Pop()
simple_linked_list_test.go:137:10: list.Pop()
real 0m0.537s
user 0m1.672s
sys 0m0.329s
==============================================================================
Exit code: -1
real 0m0.597s
user 0m1.701s
sys 0m0.382s
real 0m0.600s
user 0m1.704s
sys 0m0.383s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocyclo
Running Go gocyclo
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.026s
user 0m0.015s
sys 0m0.018s
==============================================================================
Running: gocyclo .
5 linkedlist BenchmarkListPop simple_linked_list_test.go:200:1
5 linkedlist (*List).Pop simple_linked_list.go:87:1
4 linkedlist BenchmarkListPush simple_linked_list_test.go:186:1
4 linkedlist TestPopFromNonEmptyList simple_linked_list_test.go:90:1
4 linkedlist (*List).Array simple_linked_list.go:118:1
3 linkedlist BenchmarkListReverse simple_linked_list_test.go:228:1
3 linkedlist BenchmarkListToArray simple_linked_list_test.go:217:1
3 linkedlist BenchmarkListSize simple_linked_list_test.go:175:1
3 linkedlist BenchmarkNewList simple_linked_list_test.go:166:1
3 linkedlist TestReverseEmptyList simple_linked_list_test.go:146:1
3 linkedlist TestPushToEmptyList simple_linked_list_test.go:106:1
3 linkedlist TestPopFromEmptyList simple_linked_list_test.go:79:1
3 linkedlist TestEmptyListToEmptyArray simple_linked_list_test.go:59:1
3 linkedlist TestEmptyListHasSizeZero simple_linked_list_test.go:10:1
3 linkedlist (*List).Reverse simple_linked_list.go:139:1
3 linkedlist (*List).Next simple_linked_list.go:46:1
3 linkedlist New simple_linked_list.go:21:1
2 linkedlist TestReverseNonEmptyList simple_linked_list_test.go:157:1
2 linkedlist TestPushAndPop simple_linked_list_test.go:132:1
2 linkedlist TestPushToNonEmptyList simple_linked_list_test.go:122:1
2 linkedlist TestNonEmptyListToArray simple_linked_list_test.go:70:1
2 linkedlist TestListHasCorrectSizeAfterPush simple_linked_list_test.go:47:1
2 linkedlist TestListHasCorrectSizeAfterPop simple_linked_list_test.go:35:1
2 linkedlist TestNonEmptyListHasCorrectSize simple_linked_list_test.go:28:1
2 linkedlist TestSingletonListHasSizeOne simple_linked_list_test.go:21:1
2 linkedlist ExampleList_next simple_linked_list_examples_test.go:31:1
2 linkedlist (*List).Push simple_linked_list.go:58:1
1 linkedlist ExampleList_reverse simple_linked_list_examples_test.go:138:1
1 linkedlist ExampleList_array simple_linked_list_examples_test.go:126:1
1 linkedlist ExampleList_pop simple_linked_list_examples_test.go:86:1
1 linkedlist ExampleList_push simple_linked_list_examples_test.go:52:1
1 linkedlist ExampleList_size simple_linked_list_examples_test.go:20:1
1 linkedlist ExampleList_new simple_linked_list_examples_test.go:5:1
1 linkedlist (*List).Reset simple_linked_list.go:79:1
1 linkedlist (*List).Size simple_linked_list.go:41:1
real 0m0.002s
user 0m0.000s
sys 0m0.003s
==============================================================================
Exit code: 0
real 0m0.040s
user 0m0.023s
sys 0m0.027s
real 0m0.042s
user 0m0.023s
sys 0m0.029s
===============================================================================
Running: ../../.github/citools/go/go-lint-misspell
Running Go misspell
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: misspell .
real 0m0.030s
user 0m0.036s
sys 0m0.014s
==============================================================================
Exit code: 0
real 0m0.042s
user 0m0.043s
sys 0m0.023s
real 0m0.044s
user 0m0.043s
sys 0m0.025s
===============================================================================
Running: ../../.github/citools/go/go-lint-gosec
Running Go GoSec
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.033s
user 0m0.021s
sys 0m0.022s
==============================================================================
Running: gosec ./...
[gosec] 2023/09/07 00:30:53 Including rules: default
[gosec] 2023/09/07 00:30:53 Excluding rules: default
[gosec] 2023/09/07 00:30:53 Import directory: /home/vpayno/git_vpayno/exercism-workspace/go/simple-linked-list
[gosec] 2023/09/07 00:30:53 Checking package: linkedlist
[gosec] 2023/09/07 00:30:53 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/simple-linked-list/simple_linked_list.go
Results:
[1;36mSummary:[0m
Gosec : dev
Files : 1
Lines : 154
Nosec : 0
Issues : [1;32m0[0m
real 0m0.127s
user 0m0.123s
sys 0m0.100s
==============================================================================
Exit code: 0
real 0m0.177s
user 0m0.152s
sys 0m0.137s
real 0m0.180s
user 0m0.152s
sys 0m0.139s
===============================================================================
Running: ../../.github/citools/go/go-test-cover-report
Running Go Test, Coverage & Reports
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.022s
user 0m0.016s
sys 0m0.018s
==============================================================================
Running: gotest -v -covermode=count -coverprofile coverage.out ./...
=== RUN TestEmptyListHasSizeZero
--- PASS: TestEmptyListHasSizeZero (0.00s)
=== RUN TestSingletonListHasSizeOne
--- PASS: TestSingletonListHasSizeOne (0.00s)
=== RUN TestNonEmptyListHasCorrectSize
--- PASS: TestNonEmptyListHasCorrectSize (0.00s)
=== RUN TestListHasCorrectSizeAfterPop
--- PASS: TestListHasCorrectSizeAfterPop (0.00s)
=== RUN TestListHasCorrectSizeAfterPush
--- PASS: TestListHasCorrectSizeAfterPush (0.00s)
=== RUN TestEmptyListToEmptyArray
--- PASS: TestEmptyListToEmptyArray (0.00s)
=== RUN TestNonEmptyListToArray
--- PASS: TestNonEmptyListToArray (0.00s)
=== RUN TestPopFromEmptyList
--- PASS: TestPopFromEmptyList (0.00s)
=== RUN TestPopFromNonEmptyList
--- PASS: TestPopFromNonEmptyList (0.00s)
=== RUN TestPushToEmptyList
--- PASS: TestPushToEmptyList (0.00s)
=== RUN TestPushToNonEmptyList
--- PASS: TestPushToNonEmptyList (0.00s)
=== RUN TestPushAndPop
--- PASS: TestPushAndPop (0.00s)
=== RUN TestReverseEmptyList
--- PASS: TestReverseEmptyList (0.00s)
=== RUN TestReverseNonEmptyList
--- PASS: TestReverseNonEmptyList (0.00s)
=== RUN ExampleList_new
--- PASS: ExampleList_new (0.00s)
=== RUN ExampleList_size
--- PASS: ExampleList_size (0.00s)
=== RUN ExampleList_next
--- PASS: ExampleList_next (0.00s)
=== RUN ExampleList_push
--- PASS: ExampleList_push (0.00s)
=== RUN ExampleList_pop
--- PASS: ExampleList_pop (0.00s)
=== RUN ExampleList_array
--- PASS: ExampleList_array (0.00s)
=== RUN ExampleList_reverse
--- PASS: ExampleList_reverse (0.00s)
PASS
coverage: 100.0% of statements
ok linkedlist 0.003s coverage: 100.0% of statements
real 0m0.201s
user 0m0.281s
sys 0m0.186s
==============================================================================
Running: go tool cover -func=coverage.out
linkedlist/simple_linked_list.go:21: New 100.0%
linkedlist/simple_linked_list.go:41: Size 100.0%
linkedlist/simple_linked_list.go:46: Next 100.0%
linkedlist/simple_linked_list.go:58: Push 100.0%
linkedlist/simple_linked_list.go:79: Reset 100.0%
linkedlist/simple_linked_list.go:87: Pop 100.0%
linkedlist/simple_linked_list.go:118: Array 100.0%
linkedlist/simple_linked_list.go:139: Reverse 100.0%
total: (statements) 100.0%
real 0m0.042s
user 0m0.038s
sys 0m0.047s
==============================================================================
Running: go tool cover -html coverage.out -o coverage.html
real 0m0.045s
user 0m0.034s
sys 0m0.053s
==============================================================================
Running: cover_annotate
Running: gocov convert coverage.out | gocov annotate -ceiling=100 - | tee coverage-annotations.txt
real 0m0.014s
user 0m0.008s
sys 0m0.013s
real 0m0.014s
user 0m0.008s
sys 0m0.013s
==============================================================================
Running: gotest -v -race -covermode=atomic ./...
=== RUN TestEmptyListHasSizeZero
--- PASS: TestEmptyListHasSizeZero (0.00s)
=== RUN TestSingletonListHasSizeOne
--- PASS: TestSingletonListHasSizeOne (0.00s)
=== RUN TestNonEmptyListHasCorrectSize
--- PASS: TestNonEmptyListHasCorrectSize (0.00s)
=== RUN TestListHasCorrectSizeAfterPop
--- PASS: TestListHasCorrectSizeAfterPop (0.00s)
=== RUN TestListHasCorrectSizeAfterPush
--- PASS: TestListHasCorrectSizeAfterPush (0.00s)
=== RUN TestEmptyListToEmptyArray
--- PASS: TestEmptyListToEmptyArray (0.00s)
=== RUN TestNonEmptyListToArray
--- PASS: TestNonEmptyListToArray (0.00s)
=== RUN TestPopFromEmptyList
--- PASS: TestPopFromEmptyList (0.00s)
=== RUN TestPopFromNonEmptyList
--- PASS: TestPopFromNonEmptyList (0.00s)
=== RUN TestPushToEmptyList
--- PASS: TestPushToEmptyList (0.00s)
=== RUN TestPushToNonEmptyList
--- PASS: TestPushToNonEmptyList (0.00s)
=== RUN TestPushAndPop
--- PASS: TestPushAndPop (0.00s)
=== RUN TestReverseEmptyList
--- PASS: TestReverseEmptyList (0.00s)
=== RUN TestReverseNonEmptyList
--- PASS: TestReverseNonEmptyList (0.00s)
=== RUN ExampleList_new
--- PASS: ExampleList_new (0.00s)
=== RUN ExampleList_size
--- PASS: ExampleList_size (0.00s)
=== RUN ExampleList_next
--- PASS: ExampleList_next (0.00s)
=== RUN ExampleList_push
--- PASS: ExampleList_push (0.00s)
=== RUN ExampleList_pop
--- PASS: ExampleList_pop (0.00s)
=== RUN ExampleList_array
--- PASS: ExampleList_array (0.00s)
=== RUN ExampleList_reverse
--- PASS: ExampleList_reverse (0.00s)
PASS
coverage: 100.0% of statements
ok linkedlist 1.014s coverage: 100.0% of statements
real 0m1.286s
user 0m0.328s
sys 0m0.182s
==============================================================================
Exit code: 0
real 0m1.623s
user 0m0.712s
sys 0m0.512s
real 0m1.625s
user 0m0.713s
sys 0m0.514s
===============================================================================
mv -v benchstat-new.txt benchstat-old.txt
renamed 'benchstat-new.txt' -> 'benchstat-old.txt'
gotest -v --run=xxx --bench . --benchmem |& tee benchstat-new.txt
goos: linux
goarch: amd64
pkg: linkedlist
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
BenchmarkNewList
BenchmarkNewList-8 2568748 475.7 ns/op 192 B/op 11 allocs/op
BenchmarkListSize
BenchmarkListSize-8 1000000000 0.2539 ns/op 0 B/op 0 allocs/op
BenchmarkListPush
BenchmarkListPush-8 28504 38174 ns/op 16000 B/op 1000 allocs/op
BenchmarkListPop
BenchmarkListPop-8 1024 1203566 ns/op 0 B/op 0 allocs/op
BenchmarkListToArray
BenchmarkListToArray-8 860650098 1.389 ns/op 0 B/op 0 allocs/op
BenchmarkListReverse
BenchmarkListReverse-8 35884407 34.56 ns/op 32 B/op 1 allocs/op
PASS
ok linkedlist 8.381s
real 0m8.607s
user 0m8.651s
sys 0m0.697s
===============================================================================
gotest -v -tags bonus
=== RUN TestEmptyListHasSizeZero
--- PASS: TestEmptyListHasSizeZero (0.00s)
=== RUN TestSingletonListHasSizeOne
--- PASS: TestSingletonListHasSizeOne (0.00s)
=== RUN TestNonEmptyListHasCorrectSize
--- PASS: TestNonEmptyListHasCorrectSize (0.00s)
=== RUN TestListHasCorrectSizeAfterPop
--- PASS: TestListHasCorrectSizeAfterPop (0.00s)
=== RUN TestListHasCorrectSizeAfterPush
--- PASS: TestListHasCorrectSizeAfterPush (0.00s)
=== RUN TestEmptyListToEmptyArray
--- PASS: TestEmptyListToEmptyArray (0.00s)
=== RUN TestNonEmptyListToArray
--- PASS: TestNonEmptyListToArray (0.00s)
=== RUN TestPopFromEmptyList
--- PASS: TestPopFromEmptyList (0.00s)
=== RUN TestPopFromNonEmptyList
--- PASS: TestPopFromNonEmptyList (0.00s)
=== RUN TestPushToEmptyList
--- PASS: TestPushToEmptyList (0.00s)
=== RUN TestPushToNonEmptyList
--- PASS: TestPushToNonEmptyList (0.00s)
=== RUN TestPushAndPop
--- PASS: TestPushAndPop (0.00s)
=== RUN TestReverseEmptyList
--- PASS: TestReverseEmptyList (0.00s)
=== RUN TestReverseNonEmptyList
--- PASS: TestReverseNonEmptyList (0.00s)
=== RUN ExampleList_new
--- PASS: ExampleList_new (0.00s)
=== RUN ExampleList_size
--- PASS: ExampleList_size (0.00s)
=== RUN ExampleList_next
--- PASS: ExampleList_next (0.00s)
=== RUN ExampleList_push
--- PASS: ExampleList_push (0.00s)
=== RUN ExampleList_pop
--- PASS: ExampleList_pop (0.00s)
=== RUN ExampleList_array
--- PASS: ExampleList_array (0.00s)
=== RUN ExampleList_reverse
--- PASS: ExampleList_reverse (0.00s)
PASS
ok linkedlist 0.003s
real 0m0.135s
user 0m0.198s
sys 0m0.125s
===============================================================================
benchstat benchstat-old.txt benchstat-new.txt
benchstat-old.txt:5: missing iteration count
benchstat-old.txt:7: missing iteration count
benchstat-old.txt:9: missing iteration count
benchstat-old.txt:11: missing iteration count
benchstat-old.txt:13: missing iteration count
benchstat-old.txt:15: missing iteration count
benchstat-new.txt:5: missing iteration count
benchstat-new.txt:7: missing iteration count
benchstat-new.txt:9: missing iteration count
benchstat-new.txt:11: missing iteration count
benchstat-new.txt:13: missing iteration count
benchstat-new.txt:15: missing iteration count
goos: linux
goarch: amd64
pkg: linkedlist
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
│ benchstat-new.txt │
│ sec/op │
NewList-8 475.7n ± ∞ ¹
ListSize-8 0.2539n ± ∞ ¹