mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
Modify golangci.yaml file. Resolve found lint issues. (#6008)
Signed-off-by: Xun Jiang <blackpiglet@gmail.com> Co-authored-by: Xun Jiang <blackpiglet@gmail.com>
This commit is contained in:
committed by
GitHub
parent
82358666c8
commit
15d44724e7
11
hack/lint.sh
11
hack/lint.sh
@@ -14,23 +14,14 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
LINTERS=${1:-"gosec,goconst,gofmt,goimports,unparam"}
|
||||
ALL=${2:-false}
|
||||
|
||||
HACK_DIR=$(dirname "${BASH_SOURCE[0]}")
|
||||
|
||||
# Printing out cache status
|
||||
golangci-lint cache status
|
||||
|
||||
if [[ $ALL == true ]] ; then
|
||||
action=""
|
||||
else
|
||||
action="-n"
|
||||
fi
|
||||
|
||||
# Enable GL_DEBUG line below for debug messages for golangci-lint
|
||||
# export GL_DEBUG=loader,gocritic,env
|
||||
CMD="golangci-lint run -E ${LINTERS} $action -c $HACK_DIR/../golangci.yaml"
|
||||
CMD="golangci-lint run -c $HACK_DIR/../golangci.yaml"
|
||||
echo "Running $CMD"
|
||||
|
||||
eval $CMD
|
||||
|
||||
Reference in New Issue
Block a user