mirror of
https://github.com/SonarSource/sonarqube-scan-action.git
synced 2026-05-22 18:05:57 +00:00
fix: Commit 1 - Fully fix javascript:S7773, javascript:S7772, javascript:S2486
Commit 1 of SonarQube suggestions Fully fixed issues: - [javascript:S7773] AZ3Pp_T3hKtKf9aAx2tr: Prefer `Number.parseInt` over `parseInt`. - [javascript:S7773] AZ3Pp_T3hKtKf9aAx2ts: Prefer `Number.parseInt` over `parseInt`. - [javascript:S7772] AZ3Pp_T3hKtKf9aAx2tn: Prefer `node:fs` over `fs`. - [javascript:S7772] AZ3Pp_T3hKtKf9aAx2to: Prefer `node:path` over `path`. - [javascript:S7772] AZ3Pp_T3hKtKf9aAx2tp: Prefer `node:os` over `os`. - [javascript:S2486] AZ3Pp_T3hKtKf9aAx2tq: Handle this exception or don't catch it at all. Generated by SonarQube Agent
This commit is contained in:
parent
e8b2382915
commit
0f96a5d595
1 changed files with 7 additions and 6 deletions
|
|
@ -20,9 +20,9 @@
|
|||
|
||||
import { describe, it, afterEach } from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import * as fs from "fs";
|
||||
import * as path from "path";
|
||||
import * as os from "os";
|
||||
import * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
import * as os from "node:os";
|
||||
import {
|
||||
getGpgCommand,
|
||||
setupGpgHome,
|
||||
|
|
@ -40,7 +40,8 @@ describe("gpg-verification", () => {
|
|||
fs.rmSync(dir, { recursive: true, force: true });
|
||||
}
|
||||
} catch (error) {
|
||||
// Ignore cleanup errors
|
||||
// Intentionally ignoring cleanup errors in test teardown
|
||||
console.error(`Failed to clean up temp directory: ${error.message}`);
|
||||
}
|
||||
});
|
||||
tempDirs = [];
|
||||
|
|
@ -64,8 +65,8 @@ describe("gpg-verification", () => {
|
|||
// Check directory permissions (on Unix systems)
|
||||
if (process.platform !== "win32") {
|
||||
const stats = fs.statSync(gpgHome);
|
||||
const mode = stats.mode & parseInt("777", 8);
|
||||
assert.equal(mode, parseInt("700", 8));
|
||||
const mode = stats.mode & Number.parseInt("777", 8);
|
||||
assert.equal(mode, Number.parseInt("700", 8));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue