From c686760e18f8a66a2d2a5d2173a3ffccfb1ecc28 Mon Sep 17 00:00:00 2001 From: Alexander Peters Date: Fri, 1 Dec 2023 09:21:16 +0100 Subject: [PATCH] Add staticmajor code analyzer (#1738) --- .github/workflows/staticmajor.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/staticmajor.yml diff --git a/.github/workflows/staticmajor.yml b/.github/workflows/staticmajor.yml new file mode 100644 index 00000000..1b674959 --- /dev/null +++ b/.github/workflows/staticmajor.yml @@ -0,0 +1,25 @@ +# Staticmajor: Static analyzer to catch leaking resources & other bad code patterns +name: Detect leaking resources and bad code patterns +on: + pull_request: + paths: + - "**.go" + push: + branches: [ main ] + paths: + - "**.go" + +jobs: + run_staticmajor: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v3 + - name: Staticmajor action + id: staticmajor + uses: orijtech/staticmajor-action@main + with: + packages: ./... + resleak: true + structslop: false + tests: false