Skip to content

Commit f9df116

Browse files
authored
Run CodeQL for all samples in a language (#4551)
1 parent e97127a commit f9df116

File tree

3 files changed

+2
-23
lines changed

3 files changed

+2
-23
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -109,21 +109,6 @@ jobs:
109109
with:
110110
fetch-depth: 2
111111

112-
- name: Install Java 23
113-
if: ${{ matrix.language == 'java' }}
114-
uses: actions/setup-java@v4
115-
with:
116-
distribution: 'oracle'
117-
java-version: '23'
118-
119-
- name: Install C# compiler
120-
if: ${{ matrix.language == 'c#' }}
121-
run: sudo apt-get update && sudo apt-get install -y mono-mcs
122-
123-
- name: Remove ignored paths
124-
if: ${{ github.event_name == 'pull_request' }}
125-
run: rm -f ${{ matrix.paths-ignore }}
126-
127112
- name: Read repo config
128113
uses: pietrobolcato/[email protected]
129114
id: repo-config

scripts/build_codeql_language.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
TEST_INFO_DIR: Dict[str, str] = {
1111
"c": "c",
1212
"cpp": "c-plus-plus",
13-
"c#": "c-sharp",
1413
"java": "java",
1514
"kotlin": "kotlin",
1615
}

scripts/get_codeql_languages.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
from collections import defaultdict
44
from dataclasses import dataclass
55
from fnmatch import fnmatch
6-
from pathlib import Path
7-
from typing import DefaultDict, Dict, List, Set
6+
from typing import DefaultDict, Dict, Set
87

98
LINUX = "ubuntu-latest"
109
MACOS = "macos-latest"
@@ -22,7 +21,7 @@ class LanguageInfo:
2221
"scripts/*.py": LanguageInfo(language="python"),
2322
"archive/c/c/*.c": LanguageInfo(language="c", build_mode="manual"),
2423
"archive/c/c-plus-plus/*.cpp": LanguageInfo(language="cpp", build_mode="manual"),
25-
"archive/c/c-sharp/*.cs": LanguageInfo(language="c#", build_mode="manual"),
24+
"archive/c/c-sharp/*.cs": LanguageInfo(language="c#"),
2625
"archive/g/go/*.go": LanguageInfo(language="go", build_mode="autobuild"),
2726
"archive/j/java/*.java": LanguageInfo(language="java", build_mode="manual"),
2827
"archive/j/javascript/*.js": LanguageInfo(language="javascript"),
@@ -62,9 +61,6 @@ def main():
6261
if fnmatch(changed_path, glob):
6362
languages.add(language_info)
6463
language_paths[language_info.language].add(glob)
65-
language_paths_ignore[language_info.language].update(
66-
str(path) for path in Path(".").glob(glob) if str(path) != changed_path
67-
)
6864
break
6965

7066
workflow_output = [
@@ -73,7 +69,6 @@ def main():
7369
"build-mode": language_info.build_mode,
7470
"os": language_info.os,
7571
"paths": " ".join(sorted(language_paths[language_info.language])),
76-
"paths-ignore": " ".join(sorted(language_paths_ignore[language_info.language])),
7772
}
7873
for language_info in sorted(languages, key=lambda x: x.language)
7974
]

0 commit comments

Comments
 (0)