Skip to content

feat: Enabling SCLE [NEBULA-1371] #1161

feat: Enabling SCLE [NEBULA-1371]

feat: Enabling SCLE [NEBULA-1371] #1161

Workflow file for this run

name: Code Scanning - Action
on:
push:
branches: [ master ]
pull_request:
jobs:
detekt:
runs-on: ubuntu-latest
steps:
- name: Fetch Sources
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Setup Gradle Cache
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Run detekt Gradle task
run: ./gradlew detekt
continue-on-error: true
# modifies the SARIF output produced by Detekt so that absolute URIs are relative
- name: Make artifact location URIs relative
if: always()
run: |
echo "$(
jq \
--arg github_workspace ${{ github.workspace }} \
'. | ( .runs[].results[].locations[].physicalLocation.artifactLocation.uri |= if test($github_workspace) then .[($github_workspace | length | . + 1):] else . end )' \
build/detekt.sarif
)" > build/detekt.sarif
- name: Upload SARIF to GitHub
uses: github/codeql-action/upload-sarif@v1
if: success()
with:
sarif_file: build/detekt.sarif