Home > Krazy Code Checker > kde-4.x > kdeutils > superkaramba
krazy2 Analysis
Checkers Run = 50
Files Processed = 130
Total Issues = 76
...as of September 03 2010 03:15:58 CEST
- For File Type c++
- Check for TRUE and FALSE macros [captruefalse]...okay!
- Check for methods that return 'const' refs in public classes [constref]...okay!
- Check for an acceptable copyright [copyright]...OOPS! 3 issues found!
- src/themelocale.cpp: missing tags
- src/karambasessionmanaged.cpp: missing tags
- src/karambasessionmanaged.h: missing tags
All source files must contain a copyright header which identifies the copyright holder(s) together with a e-mail address that can be used to reach the copyright holder. One copyright holder per line, with real email addresses please. For details regarding KDE's licensing policy please visit http://techbase.kde.org/Policies/Licensing_Policy. A typical copyright looks like: "Copyright 2002,2005-2006 Joe Hacker
" - Check for cpp macros and usage [cpp]...OOPS! 16 issues found!
- src/python/misc.cpp: O/S or Compiler specific macro line# 640[[__FreeBSD__]],643[[__OpenBSD__]] (2)
- src/sensors/lmsensor.cpp: O/S or Compiler specific macro line# 15,55,88,102 (4)
- src/sensors/uptime.cpp: O/S or Compiler specific macro line# 16[[__FreeBSD__]] (1)
- src/sensors/network.h: O/S or Compiler specific macro line# 52[[__FreeBSD__]] (1)
- src/sensors/lmsensor.h: O/S or Compiler specific macro line# 30 (1)
- src/sensors/network.cpp: O/S or Compiler specific macro line# 18[[__FreeBSD__]],29[[__FreeBSD__]],128[[__FreeBSD__]] (3)
- src/sensors/cpu.cpp: O/S or Compiler specific macro line# 16[[__FreeBSD__]],46[[__FreeBSD__]] (2)
- src/sensors/mem.h: O/S or Compiler specific macro line# 15[[__FreeBSD__]],55[[__FreeBSD__]] (2)
C++ source files and non-installed headers should NOT use cpp conditionals that check for a certain O/S or compiler; instead use CMake HAVE_foo macros. We want to check for features discovered during CMake time rather than for a specific O/S.
- Check for code that should be considered crashy. [crashy]...OOPS! 1 issues found!
- plasma/skapplet.cpp: line# 148 (1)
Looks for not using QPointers when showing modal dialogs via exec(), as discussed in http://www.kdedevelopers.org/node/3919
- Check single-char QString operations for efficiency [doublequote_chars]...okay!
- Check for unwanted doxygen tags in major versions [doxytags]...okay!
- Check public classes with private members or d-pointer issues [dpointer]...okay!
- Check for QString compares to "" [emptystrcompare]...okay!
- Check that file ends with a newline [endswithnewline]...okay!
- Check for C++ ctors that should be declared 'explicit' [explicit]...okay!
- Check for foreach loop issues [foreach]...OOPS! 8 issues found!
- src/python/task.cpp: non-const ref iterator line# 48,128,206,269,302,330 (6)
- src/python/imagelabel.cpp: non-const ref iterator line# 101 (1)
- src/karambainterface.cpp: non-const ref iterator line# 1944 (1)
When not using POD types (int, double, pointer, ...) you should use const & for your foreach variables. There are two reasons for this: 1) Prevents you from the mistake of writing foreach loops that modify the list, that is 'foreach(Foo f, list) f.a = f.b = f.c = 0;' compiles but does not modify the contents of list 2) Saves a copy constructor call for each of the list elements
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for invalid icon names [iconnames]...OOPS! 3 issues found!
- src/taskmanager.cpp: line# 844,865,895 (3)
Browse available icons with 'kdialog --geticon actions'. Request new icons at http://techbase.kde.org/Projects/Oxygen/Missing_Icons.
- Check for proper include directives [includes]...OOPS! 17 issues found!
- src/main.cpp: put config.h in angle brackets line# 27 (1)
- src/karamba.cpp: put config.h in angle brackets line# 47 (1)
- src/python/karamba.cpp: include own header first line# 35 (1)
- src/python/misc.cpp: duplicate includes line# 641,645 (2)
- src/sensors/mem.cpp: duplicate includes line# 18,28,19,29 (4)
- src/sensors/uptime.cpp: duplicate includes line# 17,23,18,24 (4)
- src/sensors/cpu.cpp: duplicate includes line# 19,25,20,26 (4)
Use <..> to include installed headers;
to include Qt headers from installed headers; cpp file should include their own headers first (but below config.h); other rules apply, see http://techbase.kde.org/Policies/Library_Code_Policy#Getting_.23includes_right. Use include guards in headers with appropriatedly encoded macro names. - Check for inline methods in public classes [inline]...okay!
- Check for an acceptable license [license]...OOPS! 2 issues found!
- src/lineparser.h: missing license
- src/sensors/lmsensor.h: missing license
Each source file must contain a license or a reference to a license which states under which terms the software may be used, modified and redistributed. For details regarding KDE's licensing policy please visit http://techbase.kde.org/Policies/Licensing_Policy.
- Check for assignments to QString::null [nullstrassign]...okay!
- Check for compares to QString::null or QString() [nullstrcompare]...okay!
- Check for C++ operators that should be 'const' [operators]...okay!
- Check for inappropriate pass-by-value function args [passbyvalue]...okay!
- Check for postfix usage of ++ and -- [postfixop]...OOPS! 1 issues found!
- src/python/misc.cpp: line# 691 (1)
You should use ++ and -- as prefix whenever possible as these are more efficient than postfix operators. Prefix increments first and then uses the variable, postfix uses the actual; the variable is incremented as well. Because of this, the prefix operators are inherently more efficient. WARNING Make sure that you don't introduce off-by-one errors when changing i++ to ++i.
- Check for dangerous or inefficient QByteArray usage [qbytearray]...okay!
- Check for Qt classes that should not be used [qclasses]...OOPS! 1 issues found!
- src/karambaapp.h: QSystemTrayIcon[KNotificationItem]
Don't use Qt 4 classes that are deprecated. Additionally make sure to use the KDE version of some Qt GUI elements to provide a consistent look and feel for the KDE desktop. The KDE classes are not just adding functionalities to the Qt base class and are mostly not even based on the Qt class. http://techbase.kde.org/Policies/API_to_Avoid Please refer to the API documentation for details before porting to the K classes.
- Check for Qt methods that should be avoided [qmethods]...okay!
- Check for QMIN and QMAX macros [qminmax]...okay!
- Check for classes that should use the 'Q_OBJECT' macro [qobject]...okay!
- Check for signals: and slots: [sigsandslots]...okay!
- Check for spelling errors [spelling]...okay!
- Check for strings used improperly or should be i18n. [strings]...OOPS! 7 issues found!
- src/meters/imagelabel.cpp: QLatin1String issues line# 321,327 (2)
- src/python/config.cpp: QLatin1String issues line# 172,175 (2)
- src/sensors/program.cpp: QLatin1String issues line# 129 (1)
- src/themefile.cpp: QLatin1String issues line# 227 (1)
- plasma/skappletscript.cpp: QLatin1String issues line# 92 (1)
Some QString methods (like startsWith() and endsWith()) are more efficient if they are passed a QLatin1String, avoiding an implicit conversion from const char *.
- Check for system calls to replace by KDE or Qt equivalents [syscalls]...OOPS! 6 issues found!
- src/themelocale.cpp: line# 177[getenv[qgetenv]],186[getenv[qgetenv]],187[getenv[qgetenv]],188[getenv[qgetenv]] (4)
- src/karamba.cpp: line# 277[getenv[qgetenv]],282[getenv[qgetenv]] (2)
Some system calls are not portable, please use the suggested portable wrapper instead. See kde_file.h
- Check for typedefs that should be replaced by Qt typedefs [typedefs]...OOPS! 7 issues found!
- src/karamba.cpp: line# 118[u_int[uint]],120[u_int[uint]],2032[u_int[uint]],2064[u_int[uint]] (4)
- src/sensors/network.cpp: line# 31[u_int[uint]] (1)
- src/karamba.h: line# 81[u_int[uint]],92[u_int[uint]] (2)
Please use Qt typedefs (like qint32 and qreal) as defined in QGlobals. These typedefs are guaranteed to have the size in bits that the name states on all platforms.
- For File Type kpartgui
- Check that file ends with a newline [endswithnewline]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for spelling errors [spelling]...okay!
- Validates kpartgui files using 'xmllint' [validate]...OOPS! 2 issues found!
Please make sure your .rc files conform to the XSD schema found in kdelibs/kdeui/xmlgui/kxmlgui.xsd
- For File Type designer
- Check that file ends with a newline [endswithnewline]...okay!
- Check for files that need to be fixed by 'fixuifiles' [fixuifiles]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for Qt classes that should not be used [qclasses]...OOPS! 1 issues found!
- src/themes_layout.ui: QLineEdit[KLineEdit],QComboBox[KComboBox]
Don't use Qt 4 classes that are deprecated. Additionally make sure to use the KDE version of some Qt GUI elements to provide a consistent look and feel for the KDE desktop. The KDE classes are not just adding functionalities to the Qt base class and are mostly not even based on the Qt class. http://techbase.kde.org/Policies/API_to_Avoid Please refer to the API documentation for details before porting to the K classes.
- Check for spelling errors [spelling]...okay!
- For File Type desktop
- Check that file ends with a newline [endswithnewline]...okay!
- Check for invalid icon names [iconnames]...okay!
- Check for spelling errors [spelling]...okay!
- Validates desktop files using 'desktop-file-validate' [validate]...okay!
- For File Type messages
- Check for appending to rc.cpp [rcappend]...okay!
- For File Type kconfigxt
- Check that file ends with a newline [endswithnewline]...okay!
- Check validity of i18n calls [i18ncheckarg]...okay!
- Check for spelling errors [spelling]...okay!
- Validates KConfigXT files using 'xmllint' [validate]...OOPS! 1 issues found!
Please make sure your .kcfg files conform to the KConfigXT schema