mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-10 08:52:39 +01:00
Filter out messages from included files
Summary: CppCheck shows lint messages from included files as well as the current file. Filter out those, since they don't make much sense in the context of `arc lint`. Test Plan: Before this patch, `arc lint` using `ArcanistCppcheckLinter`. Note that lint messages from included files appear pointing to a line in the active file. After this patch, only messages from the active file are included. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7444
This commit is contained in:
parent
6dc04af6e8
commit
aabbdbd2ab
1 changed files with 3 additions and 0 deletions
|
@ -96,6 +96,9 @@ final class ArcanistCppcheckLinter extends ArcanistLinter {
|
|||
continue;
|
||||
}
|
||||
$file = $location->getAttribute('file');
|
||||
if ($file != Filesystem::resolvePath($path)) {
|
||||
continue;
|
||||
}
|
||||
$line = $location->getAttribute('line');
|
||||
|
||||
$id = $error->getAttribute('id');
|
||||
|
|
Loading…
Reference in a new issue