Only run "gn check" on binary targets.

We ran into a case where a copy step triggered a check failure because the
source of a copy had a .h extension. But copy targets should not trigger header
checking.

This change excludes non-binary targets from checking altogether.

Writing a test for this ended up being quite involved. The existing header
checker tests all tie in at a lower layer to avoid complicated dependencies on
real files. In the end, I decided the benefit of a test for this check is not
worth the added complexity (and potential flakiness) of adding a new class of
check tests that use actual files.

Change-Id: I819db52d791cf3b4683fca584937f16ec4a14200
Reviewed-on: https://chromium-review.googlesource.com/899930
Commit-Queue: Brett Wilson <brettw@chromium.org>
Reviewed-by: Scott Graham <scottmg@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#534416}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: b46dd8bef522b08b069db7d42506bc416b555f34
1 file changed
tree: 0b03baac7238d3064d92bdb32d7955c088ae1be9
  1. tools/