summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Unit tests: Explicitly check for success from runner.csa-v3.4.2csa-v3.4.1csa-3.4Christian Kandeler2015-05-055-8/+14
| | | | | | | | | | 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>
* qbs build: Clear file tags of unit test resources.csa-v3.4.0Christian Kandeler2015-04-161-1/+7
| | | | | | | Otherwise qbs will try to build the cpp files in there. Change-Id: I8afd776c8e03bd5f2aea5ac254e94168c23290c3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Add qt-widgets-app unit testNikolai Kosjar2015-04-168-2/+112
| | | | | Change-Id: I502075f79d4abf6bd5c0d2080b2f543116499ace Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Fix QTC_CHECK condition in prependWordWidthArgumentIfNotIncluded()Nikolai Kosjar2015-04-161-1/+1
| | | | | Change-Id: I8a6a10eab18b8eb0eb1570eb13db91d712fb71ec Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Remove pointless Q_UNUSED()Nikolai Kosjar2015-04-151-2/+0
| | | | | Change-Id: I1379864f979dfca1cfd432ec19ad168fbe91ea52 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Set the architecture explicitly ("-m32"/"-m64)Nikolai Kosjar2015-04-152-10/+44
| | | | | | | | ...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>
* Add missing test dependenciesNikolai Kosjar2015-04-132-0/+8
| | | | | | | | | | | | Adapting to commit 044eeacde5ee1add8b06a8a53b86fd5c6991d488 Load only tested plugins when invoked with -test in the qtcreator repository. Change-Id: If28c6c79fe412e35726567505080e3723092968d Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Fix typo in unit testsNikolai Kosjar2015-04-131-1/+1
| | | | | Change-Id: I2e44d2174878211e5dfabc39c80488e5a1848943 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* De-QObjectify Settings class.Christian Kandeler2015-04-132-6/+3
| | | | | Change-Id: I67d6caff28f1196bec16cfef4dda6354700130f0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Create a dummy run configuration to create our run control from.csa-v3.4.0-rc1Christian Kandeler2015-03-092-1/+39
| | | | | | | | | | | | | | | | | | | | | | The Clang Static Analyzer differs from other analyzers in that it does not run a binary produced by the build process, but looks at source files instead. It is therefore completely unrelated to any run configurations that may or may not exist for the project. This has been ignored so far, with these two main consequences: - When running the analyzer, the name of some random run configuration appears in the application output pane, which makes it look to the user as if the corresponding executable has been run, which it has not. - For projects without run configurations (e.g. libraries), analyzing does not work out of the box, which makes no sense conceptually. So we now create our own run special run configuration (not visible in the UI) and run it directly via runRunConfiguration() instead of using the currently active run configuration via runProject(). This fixes both issues listed above. Change-Id: Icc839816f4a1e6f02a0eb2328c536b44f7304807 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Show the status message also while running.Christian Kandeler2015-03-092-16/+38
| | | | | | | | So users can see how many issues were found before the analyzer has finished, as well as browse them. Change-Id: I82452441168ecb370e7b2aac137961ebb5b8bfc3 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Use new AnalyzerUtils::logToIssuesPane().Christian Kandeler2015-03-051-15/+7
| | | | | Change-Id: I9820a81f67c06b7bb54720772467263bfa9fc8f3 Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
* Add changes-3.4.0csa-v3.4.0-beta1Eike Ziller2015-03-021-0/+7
| | | | | | Change-Id: Idfd70d71a3290f4c3e9968f2882e7a671f8995d8 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com> Reviewed-by: Riitta-Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
* Remove experimental stateEike Ziller2015-03-021-1/+0
| | | | | Change-Id: I8b66e228dff39db37b66270fec39ca526b6373a0 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Make use of the "issues" pane when errors occur during analyzing.Christian Kandeler2015-02-271-6/+24
| | | | | | | | | | | | 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>
* Allow users to suppress diagnostics.Christian Kandeler2015-02-2716-10/+808
| | | | | | | | | | | | This patch deals with what is likely the most common use case: Filtering specific messages at a particular location. The current granularity is essentially per-file (and per-function, where possible), which seems more useful than taking line numbers into account, as that would not be robust with regards to code changes elsewhere in the file. We can fine-tune this if the need arises. Change-Id: I4e9b2671fa199339cc3b995953d072b840cd3205 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Clear status message on startNikolai Kosjar2015-02-271-0/+1
| | | | | Change-Id: I82e94f0426796473b35dd2a534a4fd7c5aab2667 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Don't attempt to analyze using icecc masquerading as clang.Christian Kandeler2015-02-268-10/+106
| | | | | | | Also warn the user in the settings page against this. Change-Id: I4dbae953aa85f8dbdc9baa8dd0fda8ff0da45b76 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Don't fade out analyzer summary.Christian Kandeler2015-02-261-1/+1
| | | | | | | | There is no reason why the status of the analyzer run should disappear after a few seconds. Change-Id: I16c21f05a03ac31f489312fbe56373a531ecc5d5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Adjust to Analyzer core changesAndré Pönitz2015-02-203-6/+3
| | | | | Change-Id: I2985b1be505f9aa43f2a8615a8dfcafaeb991e21 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* Fix compile after Analyzer changesDaniel Teske2015-02-191-1/+1
| | | | | Change-Id: I3870488ff2052465508c23d429dcb2d25a249857 Reviewed-by: Andre Poenitz <andre.poenitz@theqtcompany.com>
* Compile fix after recent Analyzer core changesAndré Pönitz2015-02-194-14/+26
| | | | | | Change-Id: I100e75c526ff8609849526c3317a6d0a1658176b Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* Remove overide declarations.Christian Kandeler2015-02-132-2/+2
| | | | | | | Not ready yet. Change-Id: I800e75c526ff8609849526c3317a6d0a1658176b Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
* Merge remote-tracking branch 'origin/3.3'Eike Ziller2015-02-1329-116/+116
|\ | | | | | | | | | | | | Conflicts: plugins/clangstaticanalyzer/ClangStaticAnalyzer.json.in Change-Id: Iffa578b015c51375cdb2d9930830cb2d76433bc7
| * Update Licensecsa-v3.3.2csa-v3.3.1csa-3.3Eike Ziller2015-01-1529-116/+116
| | | | | | | | | | Change-Id: I0a127e78046369f7b55b3ace7b08a13a3f5319e5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Adapt to API change in mainline Creator.Christian Kandeler2015-02-122-58/+27
| | | | | | | | | | Change-Id: If1028fcf28373d99394d081c98e5cbc46aca81c5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Add unit tests.Christian Kandeler2015-02-0913-0/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These test the complete workflow as the user experiences it when clicking "Start". Intended usage: (1) Run sdktool to set up a kit with the toolchain you want to test against (using a temporary directory). The tests assume exactly one Kit to be present. (2) Start Creator with a matching settings path and "-load ClangStaticAnalyzer -test ClangStaticAnalyzer". (3) Repeat until all toolchains have been tested. The initial implementation tests one trivial source file with both qbs and qmake. Change-Id: I810f23e2990a789a4dd9f1dd16335fbcf5c5f39f Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Enable run control for mingw toolchains.Christian Kandeler2015-02-031-0/+1
| | | | | | | | | | | | | | This is supported now. Change-Id: If56be39138f8cb6c10e486e4a48e35964bdc0a94 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Build tests by default (*.pro)Nikolai Kosjar2015-02-021-1/+3
| | | | | | | | | | Change-Id: I8f4f5d81ea9e137b386e619512f093b6c972d92a Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* | Add support for MSVC.Christian Kandeler2015-01-308-24/+56
| | | | | | | | | | | | | | Via clang-cl, which supports the --analyze option now. Change-Id: Idbefe048eaa80e8c5bdb2244cb30c26ba7c71ef5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Add qbs project files for autotests.Christian Kandeler2015-01-304-0/+58
| | | | | | | | | | Change-Id: I7fefef8059e11fc7d08168c147e0dc8c6be7d466 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | RunControl: Reset future interface before in startEngine()Nikolai Kosjar2015-01-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Turn QTC_ASSERT into normal check.Christian Kandeler2015-01-201-2/+2
| | | | | | | | | | | | | | | | It is not an error if no toolchain is present in the kit. It just means the same as the toolchain not being gcc or clang. Change-Id: I193fd196ab830321dade1c3d32080b81a93cf645 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Merge remote-tracking branch 'origin/3.3'Eike Ziller2014-11-264-27/+112
|\ \ | |/ | | | | Change-Id: I182f4971b7ade725fc6d8c94ce194401bce51566
| * DiagnosticDelegate: Fix leaking QVBoxLayoutcsa-v3.3.0-rc1csa-v3.3.0Nikolai Kosjar2014-11-251-1/+2
| | | | | | | | | | Change-Id: I523c2c13b2b7f2b2eebc00781b6a2e18a74f8c17 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Use QString::toHtmlEscaped() for GUI textNikolai Kosjar2014-11-252-7/+12
| | | | | | | | | | | | | | | | | | Otherwise diagnostics mentioning the '<<' operator might be interpreted strangely. Task-number: QCE-21 Change-Id: Ifc55335a6639020c143edd5f8b02158f8c8ab651 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * DiagnosticView: Add copy action to context menuNikolai Kosjar2014-11-253-17/+98
| | | | | | | | | | | | | | Task-number: QCE-22 Change-Id: I22a71bd99689e4eaece3b2595b28e0d434a52453 Reviewed-by: Riitta-Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Tool: Use "No" button in mode check dialogNikolai Kosjar2014-11-241-3/+1
| | | | | | | | | | | | | | | | ...instead of "Cancel". Task-number: QCE-20 Change-Id: Ibef52dc17cb3aee73e1f42eb1c64e4f9d5a9f990 Reviewed-by: Robert Loehning <robert.loehning@theqtcompany.com>
* | Merge remote-tracking branch 'origin/3.3'Eike Ziller2014-11-241-2/+2
|\ \ | |/ | | | | Change-Id: I95f65b7f84ea7e04aad0d48d036cead40b798e20
| * Add missing variable initializations.Christian Kandeler2014-11-201-2/+2
| | | | | | | | | | Change-Id: Ib3573ee41915fe750c8615755ee1d4355cb0137d Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
* | Merge branch '3.3'Kai Koehne2014-11-1814-94/+361
|\ \ | |/ | | | | Change-Id: Ibf7466649a400f8a652f284be8edd7e33a5f969a
| * Add qbs project file.Christian Kandeler2014-11-181-0/+47
| | | | | | | | | | Change-Id: I675c1f95d7a22dca4a6cfdc8bec3f815d2576884 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Check for valid DiagnosticNikolai Kosjar2014-11-143-0/+10
| | | | | | | | | | Change-Id: Icfce44a373d56f008027330f9b1a2d446f4d2adb Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * RunControl: Skip sub projects not selected for buildingNikolai Kosjar2014-11-071-0/+3
| | | | | | | | | | Change-Id: I38e5a4f829484a7970fa4b6b06f00ec4cc92e8d0 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Sort files to processNikolai Kosjar2014-11-071-3/+9
| | | | | | | | | | Change-Id: Iac23e40c3154bf143b91d0262418f90907758276 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Use updated ProjectInfoNikolai Kosjar2014-11-073-17/+29
| | | | | | | | | | | | | | | | ...that actually make us use the ProjectInfo with updated CompilerCallData. Change-Id: Ieee298b3db64159f3faa02231921275e4466bcb5 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Ensure that project configuration did not changeNikolai Kosjar2014-11-077-23/+81
| | | | | | | | | | | | | | Otherwise we might try to analyze invalid or vanished files. Change-Id: I387dfb127618f2db21a538b07e1c152dbd026ca6 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * RunControl: Handle also ProjectInfo::CompilerCallDataNikolai Kosjar2014-11-072-55/+107
| | | | | | | | | | | | | | ...if it's available. Change-Id: I41b8ab30e0c87ddd223f115e759bbd2a2c86cc68 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Adapt to qtcreator 3.3 changes / Compile fixNikolai Kosjar2014-11-071-1/+1
| | | | | | | | | | Change-Id: I6074f163184b5287b4ba6b791cadbeeb47ae1e4e Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
| * Load the plugin only on Linux / OS XNikolai Kosjar2014-11-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On these platforms clang and/or gcc are available and the QMakeProject and QbsProject can provide "enough" information. Windows/MinGW: Currently mingw 4.8.2 can't be used with clang 3.5. See https://www.mail-archive.com/mingw-w64-public@lists.sourceforge.net/msg09490.html Tests with mingw 4.9 are needed. Windows/MSVC: This needs more investigation. Observations so far: * Does not work at the moment calling clang.exe. * clang-cl.exe does not understand '--analyze'. Passing '-Xclang --analyze' in does not help either. Change-Id: I83afe4a186cba67faf7bd0ad6c1de42790e281b2 Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>