Skip to content

Commit

Permalink
Tweak configuration for CodeQL analysis (#1897)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielelisi authored Sep 12, 2022
1 parent dbbba81 commit 95f076d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
6 changes: 6 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
paths-ignore:
- "example"
- "integration-tests"
- "packages/**/test"
- "packages/**/data"
19 changes: 8 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: "CodeQL"

on:
push:
branches: [master, ]
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
Expand All @@ -17,23 +17,20 @@ jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2

# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql/codeql-config.yml
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
Expand Down

0 comments on commit 95f076d

Please sign in to comment.