Bug 391212 - Allow hiding bugs in pre-installed Qt (add path-based filter)
Summary: Allow hiding bugs in pre-installed Qt (add path-based filter)
Status: RESOLVED FIXED
Alias: None
Product: clazy
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sergio Martins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-28 08:33 UTC by Holger Schurig
Modified: 2018-02-28 10:11 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 Holger Schurig 2018-02-28 08:33:12 UTC
I'm on Debian Stable and started to use clazy. Great tool, veeery nice.

Being on stable, I don't change the installed Qt 5.7.1+dfsg-3+b1 away to anything else.

But when I run clazy, it shows me issues in files that I don't want to change, e.g. this:

In file included from config@exe/moc_dialog_waitwlan.cpp:9:
In file included from config@exe/../../dialog_waitwlan.h:6:
In file included from config@exe/ui_form_waitwlan.h:14:
In file included from /usr/include/i386-linux-gnu/qt5/QtWidgets/QApplication:1:
In file included from /usr/include/i386-linux-gnu/qt5/QtWidgets/qapplication.h:51:
In file included from /usr/include/i386-linux-gnu/qt5/QtGui/qguiapplication.h:45:
/usr/include/i386-linux-gnu/qt5/QtGui/qinputmethod.h:106:5: warning: slot arguments need to be fully-qualified (QInputMethod::Action instead of Action) [-Wclazy-fully-qualified-moc-types]
    void invokeAction(Action a, int cursorPosition);

I get lots of those issues, and of course they clutter the display. It's now difficult to see spots on my own code because of this. Of course I could disable the test "fully-qualified-moc-types". But then this test would also be disabled for my own checks.

What would help is to have a file-based filter, so that I can tell clazy "ignore anything below /usr/include/".

(This happened both with clazy from git master of today and from tag v1.3)
Comment 1 Holger Schurig 2018-02-28 08:41:33 UTC
Oops, forget this: the README recommends to use -isystem instead of -i to exclude Qt's own issues.

However, this will need (usually) a deep surgery down into CMake, Meson, QBS, QMake. I, for example, don't know currently how to change Meson from -i to -isystem. So I guess this isn't exactly user-friendly.

Instead a CMAKE_EXCLUDE_FILES_BELOW= environment variable would be much more user friendly.
Comment 2 Sergio Martins 2018-02-28 10:09:39 UTC
Git commit 23015920c13aa64228ff0dd23cf15473a2ab18f6 by Sergio Martins.
Committed on 28/02/2018 at 10:08.
Pushed by smartins into branch 'master'.

Added CLAZY_HEADER_FILTER env variable

In case you can't use -isystem due to a weird build system.

M  +1    -0    Changelog
M  +2    -0    README.md
M  +10   -2    src/Clazy.cpp

https://commits.kde.org/clazy/23015920c13aa64228ff0dd23cf15473a2ab18f6
Comment 3 Sergio Martins 2018-02-28 10:11:55 UTC
Please test this, but I think the regexp is enough