Commit Graph

17 Commits

Author SHA1 Message Date
Nikolai Kosjar
d8d5bff071 Handle zero files to process
The analyzer was stuck in the running mode (busy cursor, progress bar)
for zero files.

Change-Id: I9e520dc65b6d027b82e6e31043c0401ebb9f3673
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-07-09 17:34:08 +03:00
Nikolai Kosjar
fafb0cb8d4 Adapt to upstream API change in CompilerOptionsBuilder II
Change-Id: I196b69846e22136773cf3cbf463a413d840dc4d2
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-29 12:15:02 +03:00
Nikolai Kosjar
3529df2e6e Fix license header
Change-Id: I017092613cdec7c00736442c10ca80b3c74f0189
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-06-26 10:24:06 +03:00
Eike Ziller
d5956e92ed Merge remote-tracking branch 'origin/3.4'
Conflicts:
	plugins/clangstaticanalyzer/clangstaticanalyzertool.cpp

Change-Id: I0362a5bb2a44c2608c2c074df45fffa022446cc4
2015-05-07 14:40:11 +02:00
Nikolai Kosjar
dca023a855 Mini refactorings in ClangStaticAnalyzerRunControl
...making ClangStaticAnalyzerRunControl::startEngine() a bit shorter.

Change-Id: Ie1547d81ba8443d663983bc0c2aa8f342932c338
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-05-05 16:26:37 +03:00
Christian Kandeler
59e01e2a89 Unit tests: Explicitly check for success from runner.
We will otherwise miss runner failures for any file that does not
contribute to the diagnostics count.
Note: The tool can also fail during the building stage, but in this case
we will get notified by the signal spy timing out.

Change-Id: Ia9aa797d658b1752e3da6e08a652ee55868955ba
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
2015-05-05 11:42:45 +03:00
Nikolai Kosjar
ef79615fe5 Extract AnalyzeUnit out of ClangStaticAnalyzerRunControl
Reduces some noise in the implementation file.

Change-Id: I24e81941c1888ba69f6b7f8dcab35956f60ca4e6
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-04-27 15:31:31 +03:00
Nikolai Kosjar
c319695a43 Set the architecture explicitly ("-m32"/"-m64)
...so that clang-cl will predefine size_t to the expected value.

Task-number: QCE-52
Change-Id: Icd663c50bae2da8d7bd2d38f19528d57d810c2fa
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
2015-04-15 18:57:54 +03: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
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
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
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
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
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
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