Laurent
(Laurent)
August 30, 2021, 12:44pm
1
We are using SonarCloud (so the last version) but the rule RSPEC-3743 is not always working, and not detecting wrong “noexcept”
Here a very simple example where there is the warning on g2, but NOT on g1…
BUT the two methods f1 and f2 are very similar
It seems to be a bug in the detection!
#include <filesystem>
#include <exception>
void f2(const std::string& _pathToFile)
{
if (!_pathToFile.empty()) throw std::exception("bad");
}
void g2() noexcept
{
f2("test");
}
void f1(const std::filesystem::path& _pathToFile)
{
if (std::filesystem::exists(_pathToFile)) throw std::exception("bad");
}
void g1() noexcept
{
f1("test");
}
Amelie
(Amélie Renard)
August 31, 2021, 9:55am
2
Hello @Laurent ,
Thank you for reporting this!
I was able to reproduce the false negative you mention, so I created a ticket (CPP-3255 ) to fix that. You’re right, there seems to be a bug on our side.
Cheers,
Amélie
Laurent
(Laurent)
September 2, 2021, 8:21am
3
I see the bug is resolved in 6.26 but trying to install the new build wrapper from https://sonarcloud.io/static/cpp/build-wrapper-win-x86.zip I still get the version 6.25…
When it will be available?
Thanks
Amelie
(Amélie Renard)
September 2, 2021, 8:58am
4
The 6.26 version of the CFamily plugin will be available in SonarQube 9.1 that is planned to be released the 17th on September.
2 Likes
system
(system)
Closed
September 9, 2021, 8:59am
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.