- versions used (SonarQube, Scanner, Plugin, and any relevant extension)
sonar cloud - error observed (wrap logs/code around triple quote ``` for proper formatting)
code smell:
(1)
(2)
- steps to reproduce
(1) https://sonarcloud.io/project/issues?id=freeeyes&open=AWcu8dmbkEeD8QRkMID-&resolved=false&types=CODE_SMELL
(2) https://sonarcloud.io/project/issues?id=freeeyes&open=AWuc9j3Ov7VSpZCtfcGy&resolved=false&types=CODE_SMELL
sonar cloud bad smell - potential workaround
(1) how to fix this?
I feel that class object names should not be listed in the scope of parameter checking?
(2) I think that the child class inherits the virtual function of the parent class. The default value of the parameter should be set. If the setting is consistent, it should pass the check.
There seems to be an error in the description below, if it cannot be compiled by the compiler as described above.
It seems correct:
class Rectangle : public Shape
{
public:
draw(E_ShapeColor color = E_RED) { .. }
Looking forward to your reply, thanks