mirror of https://github.com/portainer/portainer
fix golang ci linter prehook (#8359)
parent
fed3d14adf
commit
adf92ce5e0
|
@ -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',
|
||||
'*.(ts){,x}': () => 'tsc --noEmit',
|
||||
'*.{js,ts,tsx,css,md,html,json}': 'prettier --write',
|
||||
'*.go': 'golangci-lint run -c api/.golangci.yaml',
|
||||
'*.go': 'bash golangci-lint.sh',
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue