Files
test-sonarqube/app.js
joker d91c800460
Some checks failed
SonarQube Analysis / sonarqube (push) Failing after 46s
Add SonarQube workflow and test file
2026-01-03 20:16:56 +00:00

16 lines
360 B
JavaScript

// Test file for SonarQube analysis
function greet(name) {
if (name == null) { // Bug: should use === for strict comparison
return "Hello, World!";
}
return "Hello, " + name + "!";
}
// Code smell: unused variable
var unusedVar = 42;
// Security hotspot: hardcoded password
const password = "admin123";
console.log(greet("SonarQube"));