Skip to content

Commit

Permalink
fix: format error
Browse files Browse the repository at this point in the history
  • Loading branch information
luohoufu committed Jan 14, 2025
1 parent 0c3bac9 commit f320e85
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,21 @@ jobs:
- name: Run make format
shell: bash
run: |
echo Home path is $HOME
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME
# for test workspace
mkdir -p $HOME/go/src/
ln -s $GITHUB_WORKSPACE $WORKBASE
# check work folder
ls -lrt $WORKBASE/
ls -alrt $WORK
# for unit test
cd $WORK
echo Formating code at $PWD ...
make format
if [ $? -ne 0 ]; then
echo "make format failed, please check make output"
Expand All @@ -57,6 +72,11 @@ jobs:
id: check-changes
shell: bash
run: |
export WORKBASE=$HOME/go/src/infini.sh
export WORK=$WORKBASE/$PNAME
# for foramt check
cd $WORK
if [[ $(git status --porcelain | grep -c " M .*\.go$") -gt 0 ]]; then
echo "go format detected formatting changes"
echo "::set-output name=changes::true"
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ vendor
trash
*.so
.public
plugin/generated_plugins.go
generated_*.go
config/generated.go
config/generat*.go
config/*.tpl
config/*.yml
10 changes: 0 additions & 10 deletions config/generated.go

This file was deleted.

0 comments on commit f320e85

Please sign in to comment.