зеркало из https://github.com/golang/pkgsite.git
internal: fix staticcheck errors
Also fix the broken 'lint' subcommand in all.bash. Change-Id: Ic91876f1e03e38be2c3369b14fd428f47f397ea9 Reviewed-on: https://team-review.git.corp.google.com/c/golang/discovery/+/658564 CI-Result: Cloud Build <devtools-proctor-result-processor@system.gserviceaccount.com> Reviewed-by: Julie Qiu <julieqiu@google.com>
This commit is contained in:
Родитель
78bdbc12e7
Коммит
56d6d980f0
2
all.bash
2
all.bash
|
@ -155,7 +155,7 @@ main() {
|
|||
standard_linters
|
||||
runcmd go test -race -count=1 ./...
|
||||
;;
|
||||
lint) all_linters ;;
|
||||
lint) standard_linters ;;
|
||||
headers) check_headers ;;
|
||||
migrations) check_migrations ;;
|
||||
misspell) check_misspell ;;
|
||||
|
|
|
@ -629,7 +629,7 @@ func TestServer(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "stdlib directory subdirectories",
|
||||
urlPath: fmt.Sprintf("/cmd@go1.13?tab=subdirectories"),
|
||||
urlPath: "/cmd@go1.13?tab=subdirectories",
|
||||
wantStatusCode: http.StatusOK,
|
||||
want: in("",
|
||||
pagecheck.DirectoryHeader(dirCmd, versioned),
|
||||
|
@ -637,7 +637,7 @@ func TestServer(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "stdlib directory overview",
|
||||
urlPath: fmt.Sprintf("/cmd@go1.13?tab=overview"),
|
||||
urlPath: "/cmd@go1.13?tab=overview",
|
||||
wantStatusCode: http.StatusOK,
|
||||
want: in("",
|
||||
pagecheck.DirectoryHeader(dirCmd, versioned),
|
||||
|
@ -651,7 +651,7 @@ func TestServer(t *testing.T) {
|
|||
},
|
||||
{
|
||||
name: "stdlib directory licenses",
|
||||
urlPath: fmt.Sprintf("/cmd@go1.13?tab=licenses"),
|
||||
urlPath: "/cmd@go1.13?tab=licenses",
|
||||
wantStatusCode: http.StatusOK,
|
||||
want: in("",
|
||||
pagecheck.DirectoryHeader(dirCmd, versioned),
|
||||
|
|
|
@ -21,7 +21,6 @@ import (
|
|||
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
"github.com/google/licensecheck"
|
||||
lc "github.com/google/licensecheck"
|
||||
)
|
||||
|
||||
|
@ -522,7 +521,7 @@ func TestDetectFiles(t *testing.T) {
|
|||
{
|
||||
Types: []string{"BSD-3-Clause"},
|
||||
FilePath: "dir/Copying",
|
||||
Coverage: licensecheck.Coverage{},
|
||||
Coverage: lc.Coverage{},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче