Results 1 to 4 of 4

Thread: Which lint tool for Linux

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Which lint tool for Linux

    Which lint tool for Linux are people using now with Qt? Back in the day of DR DOS and Pen DOS and OS/2 I used to use Gimple's PC-Lint. I just looked at their site and it appears they want around a grand for the FlexLint version of the product. That's a bit much for an embedded Linux project. I was assuming it would be around the $400 price tag it used to be for DOS. Bad assumption.

    What are people here using? I used to think the "linting" ability of the GNU compilers was "good enough" but no more. I just spent hours tracking down a crash caused by a divide by zero error in this project. It was a modulo operation using a class member variable as the divosr without a zero_check before the operation. I imagine, given the size/scope/number of developers/length of this project quite a few other land mines like this are in the code. Really too difficult to search for % and / in the source with the IDE. Well, too difficult unless I can saddle an intern with the task on Monday. The % search was thousands of hits, most of which are in old C code print format logic.

    Thanks,

  2. #2
    Join Date
    Nov 2014
    Posts
    32
    Thanked 1 Time in 1 Post
    Qt products
    Platforms
    Windows

    Default Re: Which lint tool for Linux

    I choose the gcc as the compiler for QT using PC-LINT configuration tool.

  3. #3
    Join Date
    Jan 2015
    Location
    Montréal, Canada
    Posts
    6
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11

    Default Re: Which lint tool for Linux

    What about cppcheck for static source checking?
    http://cppcheck.sourceforge.net

    Very efficient and a big time saver.

    For dynamic checking, Valgrind is a life saver and as a bonus it is integrated in Qt Creator (if installed).

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Which lint tool for Linux

    cppcheck can also be easily integrated with Qt Creator, just add a new build step and invoke cppcheck with --template=gcc to get warnings integrated into the issues tab in Creator.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 5
    Last Post: 25th April 2012, 12:34
  2. Which UML tool do you use?
    By high_flyer in forum General Discussion
    Replies: 10
    Last Post: 31st March 2011, 14:30
  3. Grouping of Tool buttons in Tool bar
    By febil in forum Qt Programming
    Replies: 1
    Last Post: 24th March 2009, 12:51
  4. Creating lint build targets
    By Micawber in forum Installation and Deployment
    Replies: 1
    Last Post: 15th April 2008, 22:44
  5. Qt::Tool
    By JeanC in forum Qt Programming
    Replies: 9
    Last Post: 9th February 2008, 13:59

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.