Skip to content

[Snyk] Security upgrade ubuntu from 22.04 to kinetic #3252

[Snyk] Security upgrade ubuntu from 22.04 to kinetic

[Snyk] Security upgrade ubuntu from 22.04 to kinetic #3252

Workflow file for this run

# Run static analysis checks
name: Static Analysis
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
analysis:
runs-on: ubuntu-latest
steps:
- name: CPU Info
run: |
cat /proc/cpuinfo
echo "Number of cores: $(nproc)"
echo "Number of threads: $(nproc --all)"
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: "^1.18" # The Go version to download (if necessary) and use.
check-latest: true
- run: go version
- name: Run go vet
run: go vet ./...
- name: Install and run gocyclo
run: |
export PATH=${PATH}:`go env GOPATH`/bin
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
gocyclo -over 15 -ignore ".pb(.gw)?.go$|_test.go$|wsproxy" . || echo "gocyclo detected too complex functions"
- name: Install and run misspell
run: |
# check misspelling in all files in repository
export PATH=${PATH}:`go env GOPATH`/bin
go install github.com/client9/misspell/cmd/misspell@latest
find . -type f -exec misspell {} \;
- name: Check yaml field names and yaml tags
run: tools/validate/validateYaml.py || echo "invalid yaml field name(s) detected"
- name: Check json tags
run: tools/validate/validateJson.py || echo "invalid json tag(s) detected"