2022-07-02 08:01:25 +00:00
|
|
|
---
|
2021-08-05 07:10:51 +00:00
|
|
|
name: Lint Code
|
2020-06-21 07:16:30 +00:00
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
2021-08-05 07:10:51 +00:00
|
|
|
lint:
|
2022-07-02 08:02:25 +00:00
|
|
|
if: "!contains(github.event.head_commit.message, '[skip lint]')"
|
2021-03-14 20:14:59 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-06-21 07:16:30 +00:00
|
|
|
steps:
|
2022-07-02 08:01:25 +00:00
|
|
|
- name: Checkout
|
2022-07-02 08:02:04 +00:00
|
|
|
uses: actions/checkout@v3
|
2021-06-18 14:54:03 +00:00
|
|
|
|
2022-07-02 08:01:25 +00:00
|
|
|
- name: Super-Linter
|
|
|
|
uses: docker://ghcr.io/github/super-linter:slim-v4
|
|
|
|
env:
|
2021-08-14 10:03:02 +00:00
|
|
|
FILTER_REGEX_INCLUDE: .*(\.py|\.md|\.yml)$
|
2021-08-14 10:03:17 +00:00
|
|
|
FILTER_REGEX_EXCLUDE: .*/deps/.*
|
2021-11-22 07:38:54 +00:00
|
|
|
VALIDATE_NATURAL_LANGUAGE: false
|
2021-08-01 13:02:11 +00:00
|
|
|
VALIDATE_PYTHON_BLACK: false
|
2021-06-18 14:54:03 +00:00
|
|
|
|
2022-07-02 08:01:25 +00:00
|
|
|
- name: Bandit
|
|
|
|
run: |
|
|
|
|
pip3 install bandit
|
|
|
|
# [B101:assert_used] Use of assert detected. The enclosed code will be
|
|
|
|
# removed when compiling to optimised byte code.
|
|
|
|
# [B310:blacklist] Audit url open for permitted schemes. Allowing use
|
|
|
|
# of file:/ or custom schemes is often unexpected.
|
|
|
|
# [B404:blacklist] Consider possible security implications associated
|
|
|
|
# with subprocess module.
|
|
|
|
# [B603:subprocess_without_shell_equals_true] subprocess call - check
|
|
|
|
# for execution of untrusted input.
|
|
|
|
# [B607:start_process_with_partial_path] Starting a process with a
|
|
|
|
# partial executable path
|
|
|
|
bandit --skip B101,B310,B404,B603,B607 --recursive . --exclude \
|
|
|
|
./deps/vulkan-headers/share/vulkan/registry
|
|
|
|
...
|