1
0
Fork 0
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:
Sven Axelsson 2013-10-30 13:46:30 -07:00 committed by epriestley
parent 6dc04af6e8
commit aabbdbd2ab

View file

@ -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');