Rebecca Stambler | d33bae4 | 2021-01-07 22:36:26 -0500 | [diff] [blame] | 1 | // Copyright 2020 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Rebecca Stambler | d33bae4 | 2021-01-07 22:36:26 -0500 | [diff] [blame] | 5 | package copyright |
| 6 | |
| 7 | import ( |
Rebecca Stambler | d33bae4 | 2021-01-07 22:36:26 -0500 | [diff] [blame] | 8 | "strings" |
| 9 | "testing" |
| 10 | ) |
| 11 | |
| 12 | func TestToolsCopyright(t *testing.T) { |
Heschi Kreinick | 9e0a7b1 | 2023-04-27 10:15:48 -0400 | [diff] [blame] | 13 | files, err := checkCopyright("..") |
Rebecca Stambler | d33bae4 | 2021-01-07 22:36:26 -0500 | [diff] [blame] | 14 | if err != nil { |
| 15 | t.Fatal(err) |
| 16 | } |
| 17 | if len(files) > 0 { |
| 18 | t.Errorf("The following files are missing copyright notices:\n%s", strings.Join(files, "\n")) |
| 19 | } |
| 20 | } |