Skip to content

Commit 4d8db50

Browse files
henrymercerCopilot
andauthored
Remove unnecessary String initializations
Co-authored-by: Copilot <[email protected]>
1 parent c481481 commit 4d8db50

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/analyze.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ export async function runExtraction(
184184
}
185185
if (config.buildMode) {
186186
if (
187-
language === String(KnownLanguage.cpp) &&
187+
language === KnownLanguage.cpp &&
188188
config.buildMode === BuildMode.Autobuild
189189
) {
190190
await setupCppAutobuild(codeql, logger);
@@ -195,7 +195,7 @@ export async function runExtraction(
195195
// a stable path that caches can be restored into and that we can cache at the
196196
// end of the workflow (i.e. that does not get removed when the scratch directory is).
197197
if (
198-
language === String(KnownLanguage.java) &&
198+
language === KnownLanguage.java &&
199199
config.buildMode === BuildMode.None
200200
) {
201201
process.env["CODEQL_EXTRACTOR_JAVA_OPTION_BUILDLESS_DEPENDENCY_DIR"] =

src/autobuild.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export async function determineAutobuildLanguages(
7272
* version of the CodeQL Action.
7373
*/
7474
const autobuildLanguagesWithoutGo = autobuildLanguages.filter(
75-
(l) => l !== String(KnownLanguage.go),
75+
(l) => l !== KnownLanguage.go,
7676
);
7777

7878
const languages: Language[] = [];

src/init-action.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ async function run() {
363363
core.endGroup();
364364

365365
// Set CODEQL_ENABLE_EXPERIMENTAL_FEATURES for rust
366-
if (getOptionalInput("languages")?.includes(String(KnownLanguage.rust))) {
366+
if (getOptionalInput("languages")?.includes(KnownLanguage.rust)) {
367367
const feat = Feature.RustAnalysis;
368368
const minVer = featureConfig[feat].minimumVersion as string;
369369
const envVar = "CODEQL_ENABLE_EXPERIMENTAL_FEATURES";

0 commit comments

Comments
 (0)