Bug 383049 - Warnings are triggered when using boost tests
Summary: Warnings are triggered when using boost tests
Status: RESOLVED NOT A BUG
Alias: None
Product: clazy
Classification: Developer tools
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-02 14:18 UTC by Gaël de Chalendar (aka Kleag)
Modified: 2017-08-02 14:23 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaël de Chalendar (aka Kleag) 2017-08-02 14:18:55 UTC
Overview: Inconvenient clazy warnings on boost tests

Steps to Reproduce: 
Compile the lima project (https://github.com/aymara/lima) with clazy

Actual Results:
You get warnings when using boost unit tests, like that:

/home/gael/Projets/Lima/lima/lima_common/src/common/Data/tests/ReadWriteTools1.cpp:30:1: warning: Using copy-ctor but class boost::unit_test::basic_cstring has a
      trivial copy-ctor but non trivial assign operator [-Wclazy-rule-of-two-soft]
/usr/include/boost/test/unit_test_suite.hpp:114:73: note: expanded from macro 'BOOST_AUTO_TEST_CASE'
#define BOOST_AUTO_TEST_CASE( test_name )                               \
                                                                        ^
/usr/include/boost/test/unit_test_suite.hpp:103:46: note: expanded from macro '\
BOOST_FIXTURE_TEST_CASE'
        &BOOST_AUTO_TC_INVOKER( test_name ), #test_name ),              \

Expected Results: 
While we should switch to QTest, this is not possible currently. In the meantime, I'd like to force clazy to don't run tests in the folders containing the boost tests, but it doesn't seem to be possible.

I don't want to suppress any given test everywhere with options like -Wclazy-non-pod-global-static.
Comment 1 Gaël de Chalendar (aka Kleag) 2017-08-02 14:23:32 UTC
Sorry, I found the "// clazy:skip" notation in documentation just after sending the bug report. 
It solves my problem.