Add SonarQube workflow and test file
Some checks failed
SonarQube Analysis / sonarqube (push) Failing after 46s

This commit is contained in:
2026-01-03 20:16:56 +00:00
parent 903c715425
commit d91c800460
3 changed files with 39 additions and 0 deletions

15
app.js Normal file
View File

@@ -0,0 +1,15 @@
// 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"));