https://github.com/qbaware/nilaway-action
A GitHub Action that analyses Golang codebases for potential Nil panics, based on Uber's nilaway
https://github.com/qbaware/nilaway-action
Last synced: about 1 year ago
JSON representation
A GitHub Action that analyses Golang codebases for potential Nil panics, based on Uber's nilaway
- Host: GitHub
- URL: https://github.com/qbaware/nilaway-action
- Owner: qbaware
- License: mit
- Created: 2024-01-26T11:56:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-22T10:55:29.000Z (about 2 years ago)
- Last Synced: 2024-04-22T12:03:33.043Z (about 2 years ago)
- Language: Python
- Homepage:
- Size: 501 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# Nilaway GitHub Action
[](https://github.com/super-linter/super-linter)


This is a simple GitHub Action that checks Golang codebases for potential Nil panics.
Under the hood, it uses Uber's `nilaway` static analysis tool.
More useful information about it can be found in [this](https://www.uber.com/en-GB/blog/nilaway-practical-nil-panic-detection-for-go/)
Uber blog post or on their GitHub [repository](https://github.com/uber-go/nilaway).
## How To Use
### Figure Out The Inputs
As of now, the only input is the `package-to-scan` variable.
This is the path to the Golang package you want to analyze.
E.g. `./services/backend/...`.
### Modify Your Action
Add the following `static-analysis` job in your Action.
``` yaml
static-analysis:
# Assuming the `build` job builds the project,
# we define a dependency on it.
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Nil panic checks
uses: qbaware/nilaway-action@v0
with:
package-to-scan: ./path/to/package/...
```
### That's It 🎉
### Sample Workflow
