Skip to content

[Dependencies] Updating Meziantou.Analyzer (Code Analysis) to 2.0.94 #106

[Dependencies] Updating Meziantou.Analyzer (Code Analysis) to 2.0.94

[Dependencies] Updating Meziantou.Analyzer (Code Analysis) to 2.0.94 #106

name: "CodeQL -C#"
on:
pull_request:
# The branches below must be a subset of the branches above
branches:
- main
paths:
- '**.cs'
- '**.csproj'
- '**.sln'
concurrency:
group: ${{github.workflow}}-${{github.ref}}
cancel-in-progress: true
permissions:
contents: write
jobs:
analyze-cs:
if: github.event.pull_request.draft == false && !contains(github.event.pull_request.labels.*.name, 'dependencies')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check file existence
id: check_files
run: |
echo "Hash: ${{hashfiles('**/*.sln', '**/*.csproj', '**/*.cs')}}"
[[ -d src && -f src/global.json && '${{hashfiles('**/*.sln', '**/*.csproj', '**/*.cs')}}' != '' ]] && echo 'FILES_EXIST=true' >> "$GITHUB_OUTPUT" || echo 'FILES_EXIST=false' >> "$GITHUB_OUTPUT"
[[ -d src && -f src/global.json && '${{hashfiles('**/*.sln', '**/*.csproj', '**/*.cs')}}' != '' ]] && echo 'Exists: true' || echo 'Exists: false'
# Initializes the CodeQL tools for scanning.
- if: ${{steps.check_files.outputs.FILES_EXIST == 'true'}}
name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: csharp
# 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
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- if: ${{steps.check_files.outputs.FILES_EXIST == 'true'}}
name: Autobuild
uses: github/codeql-action/autobuild@v2
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- if: ${{steps.check_files.outputs.FILES_EXIST == 'true'}}
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2