mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-13 07:29:30 +01:00
have travis enforce gofmt, #253
This commit is contained in:
parent
8f22d5ffd8
commit
43b90f2a85
10
.travis.gofmt.sh
Normal file
10
.travis.gofmt.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
# exclude vendor/
|
||||
SOURCES="./oragono.go ./irc"
|
||||
|
||||
if [ -n "$(gofmt -s -l $SOURCES)" ]; then
|
||||
echo "Go code is not formatted correctly with \`gofmt -s\`:"
|
||||
gofmt -s -d $SOURCES
|
||||
exit 1
|
||||
fi
|
@ -7,3 +7,4 @@ script:
|
||||
- tar -xzf goreleaser_Linux_x86_64.tar.gz -C $GOPATH/bin
|
||||
- make
|
||||
- make test
|
||||
- bash ./.travis.gofmt.sh
|
||||
|
@ -282,12 +282,12 @@ func schemaChangeV2ToV3(config *Config, tx *buntdb.Tx) error {
|
||||
|
||||
func init() {
|
||||
allChanges := []SchemaChange{
|
||||
SchemaChange{
|
||||
{
|
||||
InitialVersion: "1",
|
||||
TargetVersion: "2",
|
||||
Changer: schemaChangeV1toV2,
|
||||
},
|
||||
SchemaChange{
|
||||
{
|
||||
InitialVersion: "2",
|
||||
TargetVersion: "3",
|
||||
Changer: schemaChangeV2ToV3,
|
||||
|
Loading…
Reference in New Issue
Block a user