Use omnilint as a github action with a workflow file like the following:
name: CI
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: docker://lpenz/omnilint:0.5.2
Another option is using this repository's callable workflow:
name: CI
on: push
jobs:
omnilint:
uses: lpenz/ghworkflow-rust/.github/workflows/rust.yml@v0.5.2
Or add the following to your .travis.yml to get a job that performs static analysis on the files of your repository:
jobs:
include:
- name: omnilint
language: generic
install: docker pull lpenz/omnilint
script: docker run --rm -u "$UID" -v "$PWD:$PWD" -w "$PWD" lpenz/omnilint
omnilint is a container-based tool that provides a unified interface for the static analysis of any file, using the appropriate tool.
File Linter
.c \ / cppcheck
.sh - omnilint - shelcheck
.py / | \ pyflakes
gcc-like output
json output
omnilint is specially useful when combined with CI tools like travis, jenkins, etc.
Requirements:
- docker
The easier way to install omnilint is by pulling the container from docker hub:
docker pull lpenz/omnilint
Using omnilint is a matter of starting the container with the directory with the files to be analyzed mapped:
docker run --rm -u "$UID" -v "$PWD:$PWD" -w "$PWD" omnilint
You can also simply call the script bin/omnilint-docker-run
that is present in
the repository.