Äbout cpplint
julien2412
serval2412 at yahoo.fr
Sun Apr 20 02:03:16 PDT 2014
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.
More information about the LibreOffice
mailing list