mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
fix golang ci linter prehook (#8359)
This commit is contained in:
parent
fed3d14adf
commit
adf92ce5e0
2 changed files with 12 additions and 1 deletions
11
golangci-lint.sh
Normal file
11
golangci-lint.sh
Normal file
|
@ -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…
Add table
Add a link
Reference in a new issue