]> Cypherpunks repositories - gostls13.git/commit
internal/copyright: skip testdata and vendor directories only
authorDmitri Shuralyov <dmitshur@golang.org>
Thu, 21 Nov 2024 17:50:14 +0000 (12:50 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 21 Nov 2024 22:36:18 +0000 (22:36 +0000)
commit0db250104c0ebfa82f62fe9f12338565dd8f674d
tree8a2ab14156185dac6a42f6228996bde6a86a849d
parentdc8ceb63a8413664c589059fca5806ff74486884
internal/copyright: skip testdata and vendor directories only

Using filepath.SkipDir without confirming that d is a directory makes
it prone to taking unintended action if a file (not a directory) with
the same name gets added.

This isn't a problem today, but we shouldn't spend human code review
time checking that this doesn't somehow happen in the future, either.

Change-Id: I29bf203ddef175c3ad23c9ddc10fa934126ac853
Reviewed-on: https://go-review.googlesource.com/c/go/+/630635
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
src/internal/copyright/copyright_test.go