Skip to content

Commit 2b16fd6

Browse files
authored
Modify CodeQL workflow for Java analysis only
Updated CodeQL workflow to analyze only Java, removing unnecessary comments and configurations for other languages.
1 parent fab13a0 commit 2b16fd6

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/codeql.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "CodeQL Advanced (Java only)"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '27 10 * * 3'
10+
11+
jobs:
12+
analyze:
13+
name: Analyze Java
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
security-events: write
18+
packages: read
19+
actions: read
20+
contents: read
21+
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
include:
26+
- language: java-kotlin
27+
build-mode: autobuild # usa "autobuild" per Java (funziona anche se non c'è Kotlin)
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
- name: Set up JDK 21
34+
uses: actions/setup-java@v4
35+
with:
36+
java-version: '21'
37+
distribution: 'temurin'
38+
39+
# Inizializza CodeQL per analizzare SOLO Java, ignorando la directory OLD/
40+
- name: Initialize CodeQL
41+
uses: github/codeql-action/init@v4
42+
with:
43+
languages: java
44+
build-mode: autobuild
45+
config: |
46+
paths-ignore:
47+
- OLD/**
48+
- target/**
49+
- "**/generated/**"
50+
51+
- name: Perform CodeQL Analysis
52+
uses: github/codeql-action/analyze@v4
53+
with:
54+
category: "/language:java"

0 commit comments

Comments
 (0)