fix(sonar): drop useless assignments (javascript:S1854)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-10-06 12:58:35 +02:00
parent 776c5cba4c
commit 4f8a5c6e15
2 changed files with 2 additions and 5 deletions

View File

@ -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 { bad = true; console.log(tail(p, 20)); notes.push('pip-audit FOUND vulns'); }
} else notes.push('pip-audit SKIPPED (tool/requirements missing)');
let hits;
if (have('gitleaks')) {
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;
} 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('; ') };
}],
['build', 'minify + bundle freshness', () => {

View File

@ -211,8 +211,6 @@
// ── "Use as STT / TTS" quick-apply buttons in AI Backends section ──────────
async function applyAndSaveSettings(patch) {
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) });
if (_appSettings) {
const visiblePatch = { ...patch };