forked from linuxboot/contest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_lint.sh
executable file
·22 lines (19 loc) · 891 Bytes
/
run_lint.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
set -exu
export GO111MODULE=on
# installing golangci-lint as recommended on the project page
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
go mod download
golangci-lint run --disable typecheck --enable deadcode --enable varcheck --enable staticcheck
# check license headers
# this needs to be run from the top level directory, because it uses
# `git ls-files` under the hood.
go get -u github.com/u-root/u-root/tools/checklicenses
go install github.com/u-root/u-root/tools/checklicenses
echo "[*] Running checklicenses"
go run github.com/u-root/u-root/tools/checklicenses -c tools/checklicenses-config.json