fix(sonar): drop useless assignments (javascript:S1854)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
776c5cba4c
commit
4f8a5c6e15
@ -106,12 +106,11 @@ const stages = [
|
|||||||
else if (/connection|resolve|network|timed out|ConnectionError/i.test(po) || p.error) notes.push('pip-audit SKIPPED (offline)');
|
else if (/connection|resolve|network|timed out|ConnectionError/i.test(po) || p.error) notes.push('pip-audit SKIPPED (offline)');
|
||||||
else { bad = true; console.log(tail(p, 20)); notes.push('pip-audit FOUND vulns'); }
|
else { bad = true; console.log(tail(p, 20)); notes.push('pip-audit FOUND vulns'); }
|
||||||
} else notes.push('pip-audit SKIPPED (tool/requirements missing)');
|
} else notes.push('pip-audit SKIPPED (tool/requirements missing)');
|
||||||
let hits;
|
|
||||||
if (have('gitleaks')) {
|
if (have('gitleaks')) {
|
||||||
const g = sh('gitleaks', ['detect', '--no-banner', '--redact', '--source', '.']);
|
const g = sh('gitleaks', ['detect', '--no-banner', '--redact', '--source', '.']);
|
||||||
hits = g.status === 0 ? 0 : -1; notes.push(g.status === 0 ? 'gitleaks ok' : 'gitleaks FOUND');
|
notes.push(g.status === 0 ? 'gitleaks ok' : 'gitleaks FOUND');
|
||||||
if (g.status) bad = true;
|
if (g.status) bad = true;
|
||||||
} else { hits = secretScan(); notes.push(hits ? `secret-scan ${hits} hit(s)` : 'secret-scan ok (built-in regex)'); if (hits) bad = true; }
|
} else { const hits = secretScan(); notes.push(hits ? `secret-scan ${hits} hit(s)` : 'secret-scan ok (built-in regex)'); if (hits) bad = true; }
|
||||||
return { status: bad ? 'FAIL' : 'PASS', note: notes.join('; ') };
|
return { status: bad ? 'FAIL' : 'PASS', note: notes.join('; ') };
|
||||||
}],
|
}],
|
||||||
['build', 'minify + bundle freshness', () => {
|
['build', 'minify + bundle freshness', () => {
|
||||||
|
|||||||
@ -211,8 +211,6 @@
|
|||||||
// ── "Use as STT / TTS" quick-apply buttons in AI Backends section ──────────
|
// ── "Use as STT / TTS" quick-apply buttons in AI Backends section ──────────
|
||||||
async function applyAndSaveSettings(patch) {
|
async function applyAndSaveSettings(patch) {
|
||||||
try {
|
try {
|
||||||
const resp = await fetch('/api/settings').then(r => r.json());
|
|
||||||
const updated = { ...resp, ...patch };
|
|
||||||
await fetch('/api/settings', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(patch) });
|
await fetch('/api/settings', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(patch) });
|
||||||
if (_appSettings) {
|
if (_appSettings) {
|
||||||
const visiblePatch = { ...patch };
|
const visiblePatch = { ...patch };
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user