Skip to content

Commit

Permalink
CodeQL: don't scan JS files three times.
Browse files Browse the repository at this point in the history
this requires unfortunately another config file since path settings
can't be set in the workflow config.
see github/codeql-action#283
  • Loading branch information
mbien committed Aug 27, 2021
1 parent 188e201 commit 75ba795
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
14 changes: 14 additions & 0 deletions .github/codeql/codeql-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: "Roller CodeQL config"

# paths-ignore only influences interpreted languages according to the doc
# don't scan JS files three times:
# - ignore test folder and source folder
# - target is kept to only scan what is deployed
paths-ignore:
- app/target/test-classes
- app/src

# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
10 changes: 1 addition & 9 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
Expand Down Expand Up @@ -45,10 +40,7 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
config-file: ./.github/codeql/codeql-config.yml

- name: Build with Maven
run: mvn -DskipTests=true -V -ntp install
Expand Down

0 comments on commit 75ba795

Please sign in to comment.