[clazy] [Bug 355682] new check: test QList.count() must be replaced by !QList.isEmpty()

Sergio Martins via KDE Bugzilla bugzilla_noreply at kde.org
Mon Dec 7 18:43:46 GMT 2015


https://bugs.kde.org/show_bug.cgi?id=355682

Sergio Martins <smartins at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Latest Commit|                            |http://commits.kde.org/claz
                   |                            |y/ef337e2facc0dcae72c84917d
                   |                            |0c678b02031b06e
         Resolution|---                         |FIXED

--- Comment #1 from Sergio Martins <smartins at kde.org> ---
Git commit ef337e2facc0dcae72c84917d0c678b02031b06e by Sergio Martins.
Committed on 07/12/2015 at 18:40.
Pushed by smartins into branch 'master'.

Introduce isempty-vs-count check

if (list.count()) -> if (!list.isEmpty())

This is just a warning, if someone is interested in doing the fixit please
volunteer.

M  +1    -0    CMakeLists.txt
A  +9    -0    checks/README-isempty-vs-count
A  +62   -0    checks/isempty-vs-count.cpp     [License: GPL (v2+) (+Qt
exception)]
A  +46   -0    checks/isempty-vs-count.h     [License: GPL (v2+) (+Qt
exception)]
M  +11   -11   tests/clazy/test_requested_checks.sh.expected
A  +7    -0    tests/isempty-vs-count/config.json
A  +10   -0    tests/isempty-vs-count/main.cpp     [License: UNKNOWN]  *
A  +3    -0    tests/isempty-vs-count/main.cpp.expected

The files marked with a * at the end have a non valid license. Please read:
http://techbase.kde.org/Policies/Licensing_Policy and use the headers which are
listed at that page.


http://commits.kde.org/clazy/ef337e2facc0dcae72c84917d0c678b02031b06e

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Unassigned-bugs mailing list