Commit Graph

20 Commits

Author SHA1 Message Date
Christian Kandeler
f12e53e83c Make use of the "issues" pane when errors occur during analyzing.
They can otherwise easily get lost in the Application output pane.
Policy is as follows:
    - Failure to analyze a specific file is considered a warning.
    - If no file could be successfully analyzed, we add an
      error and pop up the issues pane.
This approach is neither too noisy nor too quiet.

Change-Id: Ifc577a215006a6a565eee7de5099bd690427f7de
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-02-27 16:16:36 +02:00
Eike Ziller
a8dfba176b Merge remote-tracking branch 'origin/3.3'
Conflicts:
	plugins/clangstaticanalyzer/ClangStaticAnalyzer.json.in

Change-Id: Iffa578b015c51375cdb2d9930830cb2d76433bc7
2015-02-13 09:37:39 +01:00
Christian Kandeler
0aa20dd26d Add support for MSVC.
Via clang-cl, which supports the --analyze option now.

Change-Id: Idbefe048eaa80e8c5bdb2244cb30c26ba7c71ef5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-30 15:38:40 +02:00
Nikolai Kosjar
570e62b168 RunControl: Reset future interface before in startEngine()
This fixes an infinite loop for the following use case:
  1. Menu: Analyze > Clang Static Analzyer
  2. When finished, click "Re-run this run-configuration" in the
     application output pane

m_progress was left in the isFinished() state and the next run to
startEngine() called analyzeNextFile() which returned immediately.

Change-Id: I8acf4f03dfc1d7f81034610828f6fb707655bd52
Sanity-Review: Sanity Bot <srv.sanitybot@digia.com>
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-01-29 12:37:04 +02:00
Eike Ziller
c98db856f9 Update License
Change-Id: I0a127e78046369f7b55b3ace7b08a13a3f5319e5
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-01-15 18:46:29 +02:00
Nikolai Kosjar
e06c9ec09b RunControl: Skip sub projects not selected for building
Change-Id: I38e5a4f829484a7970fa4b6b06f00ec4cc92e8d0
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 14:11:46 +02:00
Nikolai Kosjar
124311227d Sort files to process
Change-Id: Iac23e40c3154bf143b91d0262418f90907758276
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 13:21:37 +02:00
Nikolai Kosjar
2f3666a3f0 Ensure that project configuration did not change
Otherwise we might try to analyze invalid or vanished files.

Change-Id: I387dfb127618f2db21a538b07e1c152dbd026ca6
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 12:01:44 +02:00
Nikolai Kosjar
22003c8ea0 RunControl: Handle also ProjectInfo::CompilerCallData
...if it's available.

Change-Id: I41b8ab30e0c87ddd223f115e759bbd2a2c86cc68
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 12:00:43 +02:00
Nikolai Kosjar
36d306c5ba Adapt to qtcreator 3.3 changes / Compile fix
Change-Id: I6074f163184b5287b4ba6b791cadbeeb47ae1e4e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-11-07 11:20:08 +02:00
Nikolai Kosjar
23136eb749 RunControl: Show more status in Application Output pane
Change-Id: I07e80e5a987612c19247a2d9a0628382b1136a06
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-31 11:41:00 +02:00
Nikolai Kosjar
f6eb83490a RunControl: Announce starting and finishing in Application output pane
Change-Id: I040f848dbdd6ef92ce03525e91c4b536390df9b4
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-29 12:16:09 +02:00
Nikolai Kosjar
4acbedf841 RunControl: Fix 'Stop'
Terminate/kill current runners, so that the GUI will reflect that quite
soon and not if all runners finished.

Change-Id: I83eed6ecf1678444a8b38bab6cc05d8694a4eb49
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-28 11:13:05 +02:00
Nikolai Kosjar
168682571f RunControl: qCDebug(LOG()) --> qCDebug(LOG)
Change-Id: I31ae029e2bd66badebfb40dc026d7de2158c4c13
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-24 11:28:08 +03:00
Nikolai Kosjar
3163b602e1 Remove some debug code
Change-Id: I0c23a5956ae921cdbe1e87cd12c3bc247fdedfbc
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-24 11:28:02 +03:00
Nikolai Kosjar
a8f06e858f RunControl: Use the project from the RunConfiguration
Change-Id: I9f9214bc82e9d3ebecb3974ff5197f4af885fa07
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-24 11:27:56 +03:00
Nikolai Kosjar
3f8314024c RunControl: Pass on toolchain defines and language options
Change-Id: I3a44707f7f27e1b4bb781886b63b23a3c20e0414
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-23 18:25:22 +03:00
Nikolai Kosjar
1eaef8dbb0 Fix logging category names
Change-Id: Ie4568879656a9c6c7f1713b354c4a8cf59934dd7
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-22 12:01:08 +03:00
Nikolai Kosjar
002d0c1d85 Align to qt-creator 3.3 changes
Change-Id: I3873c869f678c82b1e88c3860f62385de19ff20d
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2014-10-22 12:00:03 +03:00
Nikolai Kosjar
b9f9eb7ae5 Import Clang Static Analyzer plugin
This plugin adds "Clang Static Analyzer" to the Analyze mode, which
processes all implementation/source project files of the current
project. For this, it will call the clang executable for each file.

The found diagnostics will be displayed in a view similar to the one
used in "Valgrind Memory Analyzer".

The user can specify the clang executable to use and the number of
concurrent processes to launch in Menu: Tools > Options > Analyzer >
Clang Static Analyzer.

Main TODOs:

 * Fiddle around the appropriate command line options, currently only
   defines and include paths are passed on.

 * Tests on Windows / OS X.

 * Remove dependency to clangcodemodel by moving the functions that
   create command line arguments to CppTools. Mostly they are not even
   specific to clang (but would also work with gcc).

 * Maybe limit to a range of tested clang versions.

 * How to deal with directory containing all the log files after the
   user starts a new run or Creator is shut down? (delete it? leave it
   there? make it configurable?).

 * Find out how to properly integrate the tests.

Imaginable future additions:

 * Adding a button to load result/log files from a directory, e.g. if
   the user used the 'scan-build' approach.

 * Adding a button with a filter menu in order to display only
   diagnostics from certain categories, similar to "Valgrind Memory
   Analyzer".

Change-Id: I6aeb5dfdbdfa239a06c03dd8759a983df71b77ea
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-10-16 13:36:09 +03:00