Skip to content

Commit ff33c53

Browse files
authored
Merge pull request #2837 from xushiwei/q
xgo fmt: ignore Go files by default; chore: xgo fmt XGo source files
2 parents d167504 + 429ca2a commit ff33c53

55 files changed

Lines changed: 130 additions & 110 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/go.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ jobs:
7070
- name: Check formatting
7171
run: |
7272
if [ -n "$(go fmt ./... | grep -v xgo_autogen)" ]; then
73-
echo "Some files are not properly formatted. Please run 'go fmt ./...'"
73+
echo "Some Go files are not properly formatted. Please run 'go fmt ./...'"
7474
exit 1
7575
fi
7676
./all.bash
77-
cd cmd/xgo; xgo fmt -t ./...
77+
if [ -n "$(xgo fmt -t ./... | grep -v _nofmt | grep -v _testexpr)" ]; then
78+
echo "Some XGo files are not properly formatted. Please run 'xgo fmt ./...'"
79+
xgo fmt -t ./... | grep -v _nofmt | grep -v _testexpr
80+
exit 1
81+
fi

cl/_testspx/clsinit1/Rect.gox

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var (
2-
w, h = 10, 20
3-
line = 3
4-
color int
5-
border float64 = 1.2
2+
w, h = 10, 20
3+
line = 3
4+
color int
5+
border float64 = 1.2
66
)

cl/_testspx/clsinit2/Rect.gox

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var (
2-
w, h = 10, 20
3-
color int
4-
border float64 = 1.2
2+
w, h = 10, 20
3+
color int
4+
border float64 = 1.2
55
)
66

77
echo *this
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
var others = [Bar]
2+
23
return "Foo"

cl/_testspx/execgsh/demo.gsh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var (
2-
score = 100
2+
score = 100
33
)
44

55
echo score

cl/_testspx/newobj/Kai_spx.gox

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var (
22
score = 100
3-
Spr Spr
3+
Spr Spr
44
)
55

66
run

cl/_testxgo/domaintext-md/in.xgo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import (
2-
"os"
2+
"os"
33

4-
"github.com/xushiwei/markdown"
4+
"github.com/xushiwei/markdown"
55
)
66

77
md := markdown`

0 commit comments

Comments
 (0)