Compare commits

..

2 commits

Author SHA1 Message Date
25f1964e13 lint-scan test 2024-10-25 11:09:34 +02:00
c8b676b52f adds argo-worklows templates 2024-10-24 22:47:33 +02:00
2 changed files with 9 additions and 5 deletions

View file

@ -127,23 +127,27 @@ spec:
command: [sh, -c]
args:
- |
cd /shared-data/repo && \
go test ./... -v > test-results.txt; \
cd /shared-data/repo
go test ./... -v > test-results.txt
cat test-results.txt
volumeMounts:
- name: shared-data
mountPath: /shared-data
# How to extract artifacts
# For now this task will fail if the lint scan finds any issue with --error-on-issues
# --max-same-issues or --max-issues-per-linter also possible
- name: lint-scan
container:
image: golangci/golangci-lint:v1.61.0
command: [sh, -c]
args:
- |
cd /shared-data/repo && \
golangci-lint run ./... --out-format=json --timeout 5m > lint-results.json; \
cd /shared-data/repo
golangci-lint run ./... --issues-exit-code --out-format=json --timeout 5m > lint-results.json
result=$?
cat lint-results.json
exit $result
volumeMounts:
- name: shared-data
mountPath: /shared-data

2
fib.go
View file

@ -23,7 +23,7 @@ func Fibonacci(n uint) uint64 {
// For the sequence numbers below 94, it is recommended to use Fibonacci function as it is more efficient.
func FibonacciBig(n uint) *big.Int {
if n <= 1 {
return big.NteteewInt(int64(n))
return big.NewInt(int64(n))
}
var n2, n1 = big.NewInt(0), big.NewInt(1)