Commit Graph

14 Commits

Author SHA1 Message Date
Nikolai Kosjar
bf98bea4ad ClangTools: Sanitize parameter order
The path to the serialized diagnostics log is the main parameter, so put
it first.

Change-Id: I8865aad302b0e5d3008dab606ab774167cebda3c
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-07-26 09:54:13 +00:00
Nikolai Kosjar
917cf59a8c ClangTools: Use Utils::FilePath in log reader
Change-Id: I3a16c2eb3ac26a0265ba24f2c6f2126c79c6c660
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-25 12:57:25 +00:00
Nikolai Kosjar
f240a9a947 ClangTools: Add using for QList<Diagnostics>
Change-Id: Ie7978fc33386d083b786ad75b3b6700125b11fec
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-25 12:18:49 +00:00
Nikolai Kosjar
b6346369eb ClangTools: Fix showing diagnostics outside the project root dir
Accept diagnostics from files that are known to the project
(Project::files()) instead of checking whether they are below the
project root directory (Project::projectDirectory()).

Fixes: QTCREATORBUG-22213
Change-Id: I2f96374d6de3f53b1bd42be875dfe44b25a55fb1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-07-10 07:56:57 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
Nikolai Kosjar
d74ce63ac9 ClangTools: Remove "note:" from the Explaining Steps text
...to make it consistent with the DiagnosticItem.

Change-Id: I66ce41441058879ee293f9ae177e7b50d4856234
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-12 09:32:49 +00:00
Nikolai Kosjar
a60cd0ba30 ClangTools: Remove "in file included from" trace for header diagnostics
...as this does not add much value but rather noise.

Change-Id: I0bb8807c3f4df4114ea135bea74cde3fd21ab090
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-02-07 08:02:55 +00:00
Nikolai Kosjar
46fc8c4144 ClangTools: Show also diagnostics from project's header files
Fixes: QTCREATORBUG-21452
Change-Id: I73c85224e142f4f1d08c9ada75fe8359ebf0f984
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-25 14:32:01 +00:00
Nikolai Kosjar
171f3aec26 ClangTools: Clean up
Remove pointless classes and members.

Change-Id: I0f65934191c9db8b273aff85b70d45d510413cdb
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2019-01-25 14:31:54 +00:00
Nikolai Kosjar
5585d97522 ClangTools: Fix checking log file path
Change-Id: I3598ab0b0b512798417b8885f562ee7978b9cf3b
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-06-05 10:36:43 +00:00
Nikolai Kosjar
26b09af277 ClangTools: Allow applying fixits
Add a new column to the view that allows to check diagnostics with
fixits. The checked fixits can then be applied with the also new "Apply
Fixits" button in the toolbar.

Some corner cases are not yet handled:
 * File is open in editor
 * File changed in the mean time

Change-Id: I3d3f353a4150699a0d082f2a4348e331a4213bcf
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-16 07:10:39 +00:00
Nikolai Kosjar
23df884f4a ClangTools: Remove clang static analyzer
...since it's superseded by the tidy integration.

Change-Id: Idafa5e1fb5129b1af8e42231a664684d4b90821f
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-05-11 12:17:55 +00:00
Ivan Donchevskii
219e23332e ClangTools: Add tool that runs clang-tidy and clazy
... over the whole project.
Generate and read serialized files to get diagnostics.

Change-Id: Iafc25fc70443107a040a995efc038aed35102bbf
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2018-04-26 13:02:19 +00:00
Ivan Donchevskii
e9c462391e ClangTools: Split generic part from static analyzer tool
To reuse it for other clang-based tools.

Change-Id: I6c0d8e9eee543fa08faf3bf93c9fac33e43c6820
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2018-04-13 12:34:53 +00:00