-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-tests-go.txt
774 lines (482 loc) · 18.5 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
Running automated test file(s):
Go packages: rotationalcipher
===============================================================================
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.024s
user 0m0.019s
sys 0m0.020s
==============================================================================
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 '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 '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 '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 '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 '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 '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 '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 '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. "
rotational_cipher_test.go:88:3: expressions should not be cuddled with blocks (wsl)
t.Logf("PASS: %s", testCase.description)
^
rotational_cipher_test.go:96:2: for statements should only be cuddled with assignments used in the iteration (wsl)
for i := 0; i < b.N; i++ {
^
rotational_cipher_test.go:7:5: testCases is a global variable (gochecknoglobals)
var testCases = []struct {
^
rotational_cipher.go:39:46: mnd: Magic number: 26, in <operation> detected (gomnd)
return rune(((int(char) - offset + shift) % 26) + offset)
^
rotational_cipher_test.go:81:1: Function TestRotationalCipher missing the call to method parallel (paralleltest)
func TestRotationalCipher(t *testing.T) {
^
rotational_cipher_examples_test.go:1:9: package should be `rotationalcipher_test` instead of `rotationalcipher` (testpackage)
package rotationalcipher
^
rotational_cipher_test.go:1:9: package should be `rotationalcipher_test` instead of `rotationalcipher` (testpackage)
package rotationalcipher
^
real 0m0.513s
user 0m0.708s
sys 0m0.469s
==============================================================================
Exit code: -1
real 0m0.555s
user 0m0.736s
sys 0m0.502s
real 0m0.558s
user 0m0.737s
sys 0m0.504s
===============================================================================
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.013s
sys 0m0.022s
==============================================================================
Running: revive -formatter=stylish ./...
real 0m0.067s
user 0m0.039s
sys 0m0.051s
==============================================================================
Exit code: 0
real 0m0.106s
user 0m0.062s
sys 0m0.080s
real 0m0.108s
user 0m0.062s
sys 0m0.082s
===============================================================================
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.001s
===============================================================================
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.027s
user 0m0.017s
sys 0m0.021s
==============================================================================
Running: go-consistent -v ./...
info: check "./."
internal error: package "strings" without types was imported from "rotationalcipher"
real 0m0.091s
user 0m0.115s
sys 0m0.106s
==============================================================================
Exit code: -1
real 0m0.136s
user 0m0.141s
sys 0m0.143s
real 0m0.139s
user 0m0.142s
sys 0m0.145s
===============================================================================
Running: ../../.github/citools/go/go-lint-staticcheck
Running Go StaticCheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.022s
user 0m0.017s
sys 0m0.015s
==============================================================================
Running: staticcheck -checks=all ./...
real 0m0.178s
user 0m0.229s
sys 0m0.126s
==============================================================================
Exit code: 0
real 0m0.213s
user 0m0.254s
sys 0m0.151s
real 0m0.215s
user 0m0.255s
sys 0m0.151s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocritic
Running Go gocritic
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.028s
user 0m0.014s
sys 0m0.024s
==============================================================================
Running: gocritic check -enableAll ./...
./rotational_cipher.go:11:5: emptyStringTest: replace `len(plain) == 0` with `plain == ""`
real 0m0.854s
user 0m2.021s
sys 0m0.298s
==============================================================================
Exit code: -1
real 0m0.894s
user 0m2.041s
sys 0m0.332s
real 0m0.896s
user 0m2.042s
sys 0m0.333s
===============================================================================
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.021s
user 0m0.012s
sys 0m0.019s
==============================================================================
Running: go vet ./...
real 0m0.072s
user 0m0.118s
sys 0m0.091s
==============================================================================
Exit code: 0
real 0m0.103s
user 0m0.136s
sys 0m0.118s
real 0m0.105s
user 0m0.138s
sys 0m0.118s
===============================================================================
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.017s
user 0m0.012s
sys 0m0.013s
==============================================================================
Running: go fix ./...
real 0m0.021s
user 0m0.009s
sys 0m0.022s
==============================================================================
Exit code: 0
real 0m0.048s
user 0m0.026s
sys 0m0.043s
real 0m0.050s
user 0m0.027s
sys 0m0.045s
===============================================================================
Running: ../../.github/citools/go/go-lint-errcheck
Running Go errcheck
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.021s
user 0m0.013s
sys 0m0.017s
==============================================================================
Running: errcheck ./...
real 0m0.482s
user 0m1.566s
sys 0m0.305s
==============================================================================
Exit code: 0
real 0m0.513s
user 0m1.582s
sys 0m0.334s
real 0m0.516s
user 0m1.582s
sys 0m0.336s
===============================================================================
Running: ../../.github/citools/go/go-lint-gocyclo
Running Go gocyclo
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.019s
user 0m0.009s
sys 0m0.017s
==============================================================================
Running: gocyclo .
5 rotationalcipher RotationalCipher rotational_cipher.go:10:1
4 rotationalcipher BenchmarkRotationalCipher rotational_cipher_test.go:92:1
3 rotationalcipher TestRotationalCipher rotational_cipher_test.go:81:1
3 rotationalcipher shiftChar rotational_cipher.go:28:1
1 rotationalcipher ExampleRotationalCipher rotational_cipher_examples_test.go:7:1
real 0m0.002s
user 0m0.000s
sys 0m0.003s
==============================================================================
Exit code: 0
real 0m0.033s
user 0m0.016s
sys 0m0.029s
real 0m0.035s
user 0m0.017s
sys 0m0.030s
===============================================================================
Running: ../../.github/citools/go/go-lint-misspell
Running Go misspell
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: misspell .
real 0m0.041s
user 0m0.040s
sys 0m0.020s
==============================================================================
Exit code: 0
real 0m0.056s
user 0m0.050s
sys 0m0.029s
real 0m0.059s
user 0m0.050s
sys 0m0.032s
===============================================================================
Running: ../../.github/citools/go/go-lint-gosec
Running Go GoSec
Go version:
go version go1.21.0 linux/amd64
==============================================================================
Running: go clean ./...
real 0m0.031s
user 0m0.021s
sys 0m0.030s
==============================================================================
Running: gosec ./...
[gosec] 2023/09/07 00:30:11 Including rules: default
[gosec] 2023/09/07 00:30:11 Excluding rules: default
[gosec] 2023/09/07 00:30:11 Import directory: /home/vpayno/git_vpayno/exercism-workspace/go/rotational-cipher
[gosec] 2023/09/07 00:30:11 Checking package: rotationalcipher
[gosec] 2023/09/07 00:30:11 Checking file: /home/vpayno/git_vpayno/exercism-workspace/go/rotational-cipher/rotational_cipher.go
Results:
[1;36mSummary:[0m
Gosec : dev
Files : 1
Lines : 65
Nosec : 0
Issues : [1;32m0[0m
real 0m0.120s
user 0m0.115s
sys 0m0.085s
==============================================================================
Exit code: 0
real 0m0.168s
user 0m0.141s
sys 0m0.132s
real 0m0.172s
user 0m0.143s
sys 0m0.134s
===============================================================================
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.011s
sys 0m0.020s
==============================================================================
Running: gotest -v -covermode=count -coverprofile coverage.out ./...
=== RUN TestRotationalCipher
rotational_cipher_test.go:88: PASS: zero len input, rotate by 0
rotational_cipher_test.go:88: PASS: zero len input, rotate by 3
rotational_cipher_test.go:88: PASS: rotate a by 0, same output as input
rotational_cipher_test.go:88: PASS: rotate a by 1
rotational_cipher_test.go:88: PASS: rotate a by 26, same output as input
rotational_cipher_test.go:88: PASS: rotate n by 13 with wrap around alphabet
rotational_cipher_test.go:88: PASS: rotate capital letters
rotational_cipher_test.go:88: PASS: rotate spaces
rotational_cipher_test.go:88: PASS: rotate numbers
rotational_cipher_test.go:88: PASS: rotate punctuation
rotational_cipher_test.go:88: PASS: rotate all letters
--- PASS: TestRotationalCipher (0.00s)
=== RUN ExampleRotationalCipher
--- PASS: ExampleRotationalCipher (0.00s)
PASS
coverage: 100.0% of statements
ok rotationalcipher 0.002s coverage: 100.0% of statements
real 0m0.192s
user 0m0.298s
sys 0m0.157s
==============================================================================
Running: go tool cover -func=coverage.out
rotationalcipher/rotational_cipher.go:10: RotationalCipher 100.0%
rotationalcipher/rotational_cipher.go:28: shiftChar 100.0%
total: (statements) 100.0%
real 0m0.045s
user 0m0.054s
sys 0m0.064s
==============================================================================
Running: go tool cover -html coverage.out -o coverage.html
real 0m0.041s
user 0m0.046s
sys 0m0.061s
==============================================================================
Running: cover_annotate
Running: gocov convert coverage.out | gocov annotate -ceiling=100 - | tee coverage-annotations.txt
real 0m0.016s
user 0m0.012s
sys 0m0.015s
real 0m0.016s
user 0m0.012s
sys 0m0.015s
==============================================================================
Running: gotest -v -race -covermode=atomic ./...
=== RUN TestRotationalCipher
rotational_cipher_test.go:88: PASS: zero len input, rotate by 0
rotational_cipher_test.go:88: PASS: zero len input, rotate by 3
rotational_cipher_test.go:88: PASS: rotate a by 0, same output as input
rotational_cipher_test.go:88: PASS: rotate a by 1
rotational_cipher_test.go:88: PASS: rotate a by 26, same output as input
rotational_cipher_test.go:88: PASS: rotate n by 13 with wrap around alphabet
rotational_cipher_test.go:88: PASS: rotate capital letters
rotational_cipher_test.go:88: PASS: rotate spaces
rotational_cipher_test.go:88: PASS: rotate numbers
rotational_cipher_test.go:88: PASS: rotate punctuation
rotational_cipher_test.go:88: PASS: rotate all letters
--- PASS: TestRotationalCipher (0.00s)
=== RUN ExampleRotationalCipher
--- PASS: ExampleRotationalCipher (0.00s)
PASS
coverage: 100.0% of statements
ok rotationalcipher 1.012s coverage: 100.0% of statements
real 0m1.260s
user 0m0.306s
sys 0m0.169s
==============================================================================
Exit code: 0
real 0m1.587s
user 0m0.735s
sys 0m0.494s
real 0m1.590s
user 0m0.738s
sys 0m0.494s
===============================================================================
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: rotationalcipher
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
BenchmarkRotationalCipher
BenchmarkRotationalCipher-8 1147933 1004 ns/op 280 B/op 16 allocs/op
PASS
ok rotationalcipher 1.996s
real 0m2.159s
user 0m2.262s
sys 0m0.184s
===============================================================================
gotest -v -tags bonus
=== RUN TestRotationalCipher
rotational_cipher_test.go:88: PASS: zero len input, rotate by 0
rotational_cipher_test.go:88: PASS: zero len input, rotate by 3
rotational_cipher_test.go:88: PASS: rotate a by 0, same output as input
rotational_cipher_test.go:88: PASS: rotate a by 1
rotational_cipher_test.go:88: PASS: rotate a by 26, same output as input
rotational_cipher_test.go:88: PASS: rotate n by 13 with wrap around alphabet
rotational_cipher_test.go:88: PASS: rotate capital letters
rotational_cipher_test.go:88: PASS: rotate spaces
rotational_cipher_test.go:88: PASS: rotate numbers
rotational_cipher_test.go:88: PASS: rotate punctuation
rotational_cipher_test.go:88: PASS: rotate all letters
--- PASS: TestRotationalCipher (0.00s)
=== RUN ExampleRotationalCipher
--- PASS: ExampleRotationalCipher (0.00s)
PASS
ok rotationalcipher 0.002s
real 0m0.125s
user 0m0.154s
sys 0m0.114s
===============================================================================
benchstat benchstat-old.txt benchstat-new.txt
benchstat-new.txt:5: missing iteration count
goos: linux
goarch: amd64
pkg: rotationalcipher
cpu: 12th Gen Intel(R) Core(TM) i5-1240P
│ benchstat-new.txt │
│ sec/op │
RotationalCipher-8 1.004µ ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
│ benchstat-new.txt │
│ B/op │
RotationalCipher-8 280.0 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
│ benchstat-new.txt │
│ allocs/op │
RotationalCipher-8 16.00 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
cpu: Intel(R) Core(TM) i7-7Y75 CPU @ 1.30GHz
│ benchstat-old.txt │
│ sec/op │
RotationalCipher-4 3.611µ ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
│ benchstat-old.txt │
│ B/op │
RotationalCipher-4 280.0 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
│ benchstat-old.txt │
│ allocs/op │
RotationalCipher-4 16.00 ± ∞ ¹
¹ need >= 6 samples for confidence interval at level 0.95
real 0m0.006s
user 0m0.001s
sys 0m0.002s
===============================================================================
gomarkdoc --output rotationalcipher-doc.md
real 0m0.010s
user 0m0.006s
sys 0m0.003s
===============================================================================
go doc -all rotationalcipher
package rotationalcipher // import "rotationalcipher"
Package rotationalcipher is used to encrypt data.
FUNCTIONS
func RotationalCipher(plain string, shiftKey int) string
RotationalCipher returns a cipher text after applying a rotational cipher to
a plain text input.
real 0m0.046s
user 0m0.030s
sys 0m0.033s
===============================================================================