Skip to content

Commit

Permalink
Attempt to restrict paths in CodeQL
Browse files Browse the repository at this point in the history
This worked in the mkiocccentry repo and it is hoped that it works fine
here without modifications. If it fails it could be because of the fact
this is only a placeholder at this point but it hopefully would be easy
to fix. Later on when the parser is populated into the repo all the
tests will be run properly.
  • Loading branch information
xexyl committed Jul 27, 2024
1 parent a423323 commit 5961e2b
Showing 1 changed file with 27 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,35 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# 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:
push:
branches: [ "master" ]
paths:
- '**/Makefile'
- '**/*.c'
- '**/*.h'
- '**/*.y'
- '**/*.l'
- '**/*.sh'
pull_request:
# The branches below must be a subset of the branches above
branches: [ "master" ]
paths:
- '**/Makefile'
- '**/*.c'
- '**/*.h'
- '**/*.y'
- '**/*.l'
- '**/*.sh'
# Manual trigger from Actions
workflow_dispatch:
branches: [ "master" ]
paths:
- '**/Makefile'
- '**/*.c'
- '**/*.h'
- '**/*.y'
- '**/*.l'
- '**/*.sh'
schedule:
- cron: '18 15 * * 5'

Expand All @@ -34,8 +47,6 @@ jobs:
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
Expand All @@ -47,15 +58,11 @@ jobs:
uses: github/codeql-action/init@v3
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.


# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# Autobuild attempts to build any compiled language.
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
Expand All @@ -73,4 +80,4 @@ jobs:
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
category: "/language:${{matrix.language}}"

0 comments on commit 5961e2b

Please sign in to comment.