Hey guys I got this from the libre office developers list. I wonder if
cpplint would be useful for us as well to improve our code quality. What
does one think?
---------- Forwarded message ----------
From: julien2412 <[email protected]>
Date: Sun, Apr 20, 2014 at 11:03 AM
Subject: Äbout cpplint
To: [email protected]
Hi,
I gave a try to cpplint
(http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py) with
some changes so it scan subdirectories.
Except pure formatting warnings, it reports things like this:
1) ./drawinglayer/source/primitive2d/polygonprimitive2d.cxx:274: Consider
using rand_r(...) instead of rand(...) for improved thread safety.
[runtime/threadsafe_fn]
(other functions quoted in the py script:
asctime_r, ctime_r, getgrgid_r, getgrnam_r, getlogin_r, getpwnam_r,
getpwuid_r, gmtime_r, localtime_r, strtok_r, ttyname_r)
2) ./fpicker/source/win32/filepicker/comptr.hxx:100: Unary operator& is
dangerous. Do not use it. [runtime/operator] [4]
3) ./crashrep/source/unx/main.cxx:64: For a static/global string constant,
use a C style string instead: "static char g_strProductKey[]".
[runtime/string]
4) ./sd/source/ui/remotecontrol/Transmitter.cxx:10: Streams are highly
discouraged. [readability/streams]
5) ./sd/source/ui/remotecontrol/mDNSResponder/CommonServices.h:488: Are you
taking an address of a cast? This is dangerous: could be a temp var. Take
the address before doing the cast, rather than after [runtime/casting]
6) ./include/comphelper/sequenceashashmap.hxx:81: Single-argument
constructors should be marked explicit. [runtime/explicit]
7) ./oox/source/helper/binaryoutputstream.cxx:122: Do not use
variable-length arrays. Use an appropriately named ('k' followed by
CamelCase) compile-time constant for the size. [runtime/arrays]
There are other different types of warnings about headers/include guards but
would you have some opinion about these first?
Julien
--
View this message in context:
http://nabble.documentfoundation.org/About-cpplint-tp4105821.html
Sent from the Dev mailing list archive at Nabble.com.
_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice
--
Jonathan Aquilina
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
LMMS-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lmms-devel