Merge pull request #257 from slingamn/issue253

have travis enforce gofmt, #253
This commit is contained in:
Daniel Oaks
2018-04-23 12:24:58 +10:00
committed by GitHub
3 changed files with 13 additions and 2 deletions
+10
View 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
+1
View File
@@ -7,3 +7,4 @@ script:
- tar -xzf goreleaser_Linux_x86_64.tar.gz -C $GOPATH/bin
- make
- make test
- bash ./.travis.gofmt.sh
+2 -2
View File
@@ -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,