From 0bf656b90469d01e97cd2ed1d49b79896aa51da1 Mon Sep 17 00:00:00 2001 From: Igor Canadi Date: Mon, 19 Oct 2015 18:47:59 -0700 Subject: [PATCH] Don't spew warnings when flint doesn't exist Summary: Before this diff `arc lint` on non-fb machine issued warnings. Now it doesn't. Test Plan: `arc lint` is quiet. Reviewers: yhchiang, sdong Reviewed By: sdong Subscribers: dhruba, leveldb Differential Revision: https://reviews.facebook.net/D49071 --- arcanist_util/cpp_linter/FbcodeCppLinter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arcanist_util/cpp_linter/FbcodeCppLinter.php b/arcanist_util/cpp_linter/FbcodeCppLinter.php index 66eefa004..3dac9bf73 100644 --- a/arcanist_util/cpp_linter/FbcodeCppLinter.php +++ b/arcanist_util/cpp_linter/FbcodeCppLinter.php @@ -88,6 +88,9 @@ class FbcodeCppLinter extends ArcanistLinter { } private function getCppLintOutput($path) { + if (!array_key_exists($path, $this->rawLintOutput)) { + return array(); + } list($output) = $this->rawLintOutput[$path]; $msgs = array();