fix golang ci linter prehook (#8359)

pull/8368/head
Prabhat Khera 2 years ago committed by GitHub
parent fed3d14adf
commit adf92ce5e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,11 @@
#!/bin/bash
cd api
if golangci-lint run -c .golangci.yaml
then
echo "golangci-lint run successfully"
else
echo "golangci-lint run failed"
exit 1
fi

@ -2,5 +2,5 @@ module.exports = {
'*.(js|ts){,x}': 'eslint --cache --fix', '*.(js|ts){,x}': 'eslint --cache --fix',
'*.(ts){,x}': () => 'tsc --noEmit', '*.(ts){,x}': () => 'tsc --noEmit',
'*.{js,ts,tsx,css,md,html,json}': 'prettier --write', '*.{js,ts,tsx,css,md,html,json}': 'prettier --write',
'*.go': 'golangci-lint run -c api/.golangci.yaml', '*.go': 'bash golangci-lint.sh',
}; };

Loading…
Cancel
Save