I am having an issue with SonarQube, and I was hoping someone might be able to help me troubleshoot it.
Here is a brief description of the problem:
I am trying to create a new document in Mongoose, but SonarQube is giving me the error “Replace User with a constructor function.” I have already defined the User object as a constructor function using the mongoose.model() function, but the error persists.
Since all the necessary information has been included, we’ve flagged this for attention by an expert. This means that somebody will look at your report, maybe ask some follow-up questions, and try and determine if it’s really a false-positive that should be fixed.
This review could be done hours, days, or even weeks from now. If it takes a while – it doesn’t mean your report isn’t important to us, it just means that our teams are already hard-at-work developing new language analysis features, and your report is in the queue.
If you’re using SonarQube or SonarCloud – an issue administrator can always mark an issue as a false-positive in the UI (this also suppresses it in SonarLint when using Connected Mode). The rule can also be disabled in your Quality Profile if it’s particularly noisy.