blob: 42b72daf7c4f9ca603664495320b4d6884d9590c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
name: GObject Lint
# Static analysis of the GObject/GLib C code with gobject-linter.
# Rules and severities are configured in ./gobject-linter.toml.
# This is a blocking gate: the "Lint (blocking)" step fails the build on any
# error-level finding. use_auto_cleanup is configured as a warning and does not
# block (it mis-fires on floating GVariant references; see gobject-linter.toml).
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
jobs:
gobject-linter:
runs-on: ubuntu-latest
container:
image: ghcr.io/bilelmoussaoui/gobject-linter:latest
permissions:
contents: read
security-events: write
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
# Produce SARIF for the Security tab and inline PR annotations.
# Never fails the job — the blocking gate below decides pass/fail.
- name: Analyze (SARIF)
run: gobject-linter . --format sarif > gobject-linter.sarif || true
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
# Pull requests from forks get a read-only token and cannot upload to
# code scanning; don't let that fail the run.
continue-on-error: true
with:
sarif_file: gobject-linter.sarif
category: gobject-linter
# Blocking gate: exits non-zero on any error-level finding.
- name: Lint (blocking)
run: gobject-linter .
|