Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. [SOLVED] Result of source code analysis in Qt Creator
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Result of source code analysis in Qt Creator

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 2.8k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    th.thielemann
    wrote on last edited by
    #1

    We are using a tool for static source code analyses. This tool can output findings as free form text. E. g.

    @... other findings ...
    <path/to/my/source/parameter.cpp(1,1): MsgID(4711) Prefer C++ style comments to C style comments.
    C++ style comments can be nested unlike the C-style comments.
    ... other findings ...@

    I'm wondering whether it is possible to use the external file in Qt Creator like "Compiler Output": show the message and got to source on click

    Regards,
    Thomas

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      I think you would need to write a plugin for QtCreator that would parse the output file of your static code analyzer and show the problem in the Issue Pane. You might find more information in "QtCreator's documentation about extension":http://doc-snapshot.qt-project.org/qtcreator-extending/extending-index.html

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • T Offline
        T Offline
        th.thielemann
        wrote on last edited by
        #3

        The current solution is to write to a file *.tasks in the format
        @<Path/to/file/filename><TAB><ROW><TAB><"warn"|"err"><TAB><COL><Message to show>@

        Example:
        @c:\home\src\handler.cpp 149 warn 12 Trigraph '??!' replaced with '|'.@

        This file can be drag&drop into QtCreator and shown in output pane Issues.

        1 Reply Last reply
        0
        • U Offline
          U Offline
          Uflex
          wrote on last edited by
          #4

          Hi, I haven't tried it myself but maybe you can use this third party plugin:
          "QtProjectTool":http://sourceforge.net/projects/qtprojecttool/
          http://qt-project.org/forums/viewthread/25797/

          You may have to write an adapter for your static analysis tool but it might save you some time.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved