Template for a good new topic, formatted with Markdown:
- ALM used:
- GitHub cloned project from BitBucket (used the mirror technique)
- CI system used (Bitbucket Cloud, Azure DevOps, Travis CI, Circle CI
- Not using (internally we use Jenkins on a VM)
- Scanner command used when applicable (private details masked)
- Uploaded to SonarCloud (14 day trial, but I’ve ALREADY PAID FOR THE MONTH via BitBucket. Apparently that isn’t transferable)
- Languages of the repository
- Java
- Python
- Only if the SonarCloud project is public, the URL
- Private
- Error observed
- Seems like good code?
- Steps to reproduce
- Scan a project
- Potential workaround
- Ignore “Blockers”
I have some JavaScript code for a Lambda:
getannualTaxSheildAmount: function(financedAmount, emi, rate, year, pFee, quoteData) {
// ...
var tenureInMonth = year * 12;
for (i = 1; i <= tenureInMonth; i++) {
var tempInterest = balanceAmount[i - 1] * monthlyrate;
// ... code snipped
}
I get a severity: Blocker error:
Intentionality Not logical
‘tenureInMonth’ is not modified in this loop.
Loops should not be infinite
Software qualities impacted:
- Reliability
How in the world is this an infinite loop? I mean, maybe it’s worried about ‘year’ being passed in (yes, I realize the code looks weird) but modifying the end condition inside a straight forward for loop seems weird.