Permalink
Browse files

sync margo

  • Loading branch information...
DisposaBoy committed Nov 28, 2018
1 parent 6a26a9d commit 894c71eb6ce4fb2a7f89a36ae1b73b633e563cc9
Showing with 1,676 additions and 1,102 deletions.
  1. +1 −2 src/margo.sh/.travis.yml
  2. +66 −0 src/margo.sh/cmdpkg/margo/ci.go
  3. +1 −1 src/margo.sh/cmdpkg/margo/dev.go
  4. +1 −0 src/margo.sh/cmdpkg/margo/main.go
  5. +17 −284 src/margo.sh/golang/common.go
  6. +0 −20 src/margo.sh/golang/common_test.go
  7. +0 −16 src/margo.sh/golang/completion_test.go
  8. +28 −267 src/margo.sh/golang/cursor.go
  9. +407 −0 src/margo.sh/golang/cursor/curctx.go
  10. +77 −0 src/margo.sh/golang/cursor/curscope.go
  11. +16 −0 src/margo.sh/golang/cursor/cursor_test.go
  12. +2 −2 src/margo.sh/golang/gocode_calltips.go
  13. +2 −1 src/margo.sh/golang/gocode_suggest.go
  14. +136 −0 src/margo.sh/golang/goutil/common.go
  15. +82 −0 src/margo.sh/golang/goutil/common_test.go
  16. +79 −0 src/margo.sh/golang/goutil/parse.go
  17. +1 −1 src/margo.sh/golang/guru.go
  18. +3 −0 src/margo.sh/golang/internal/pkglst/pkglst.go
  19. +9 −0 src/margo.sh/golang/margocode.go
  20. +12 −60 src/margo.sh/golang/parse.go
  21. +29 −436 src/margo.sh/golang/snippets.go
  22. +54 −0 src/margo.sh/golang/snippets/append-snippet.go
  23. +32 −0 src/margo.sh/golang/snippets/defer-snippet.go
  24. +87 −0 src/margo.sh/golang/snippets/doc-snippet.go
  25. +68 −0 src/margo.sh/golang/snippets/func-snippet.go
  26. +61 −0 src/margo.sh/golang/snippets/gen-decl-snippet.go
  27. +30 −0 src/margo.sh/golang/snippets/init-func-snippet.go
  28. +30 −0 src/margo.sh/golang/snippets/main-func-snippet.go
  29. +24 −0 src/margo.sh/golang/snippets/map-snippet.go
  30. +96 −0 src/margo.sh/golang/snippets/method-snippet.go
  31. +62 −0 src/margo.sh/golang/snippets/mutex-snippet.go
  32. +59 −0 src/margo.sh/golang/snippets/package-name-snippet.go
  33. +21 −0 src/margo.sh/golang/snippets/return-snippet.go
  34. +26 −0 src/margo.sh/golang/snippets/snippets.go
  35. +28 −0 src/margo.sh/golang/snippets/type-snippet.go
  36. +4 −0 src/margo.sh/mg/ctx.go
  37. +11 −4 src/margo.sh/mg/issue.go
  38. +1 −1 src/margo.sh/mg/lint.go
  39. +1 −2 src/margo.sh/mg/restart.go
  40. +4 −2 src/margo.sh/mg/store.go
  41. +8 −3 src/margo.sh/mg/tasks.go
@@ -15,5 +15,4 @@ matrix:
go_import_path: margo.sh
script:
- go test -race -v ./...
- go vet ./...
- margo.sh ci
@@ -0,0 +1,66 @@
package margo
import (
"github.com/urfave/cli"
"margo.sh/cmdpkg/margo/cmdrunner"
"strings"
)
var ciCmd = cli.Command{
Name: "ci",
Description: "ci runs various tests for use in ci environments, etc.",
ArgsUsage: "[patterns...] (default 'margo.sh/...')",
Flags: []cli.Flag{
cli.BoolFlag{
Name: "quick",
Usage: "Disable '-race' and other things that are known to be slow.",
},
},
Action: func(cx *cli.Context) error {
quick := cx.Bool("quick")
race := !quick
pats := cx.Args()
if len(pats) == 0 {
pats = []string{"margo.sh/..."}
}
testScript := []string{"go", "test"}
if race {
testScript = append(testScript, "-race")
}
vetScript := []string{"go", "vet",
"-all",
"-printfuncs", strings.Join([]string{
"Errorf",
"Fatal", "Fatalf",
"Fprint", "Fprintf", "Fprintln",
"Panic", "Panicf", "Panicln",
"Print", "Printf", "Println",
"Sprint", "Sprintf", "Sprintln",
"AddErrorf",
"AddStatusf",
"dbgf",
"EmTextf",
"Textf",
}, ","),
}
scripts := [][]string{
vetScript,
testScript,
}
for _, script := range scripts {
cmd := cmdrunner.Cmd{
Name: script[0],
Args: append(script[1:], pats...),
OutToErr: true,
}
if err := cmd.Run(); err != nil {
return err
}
}
return nil
},
}
@@ -10,7 +10,7 @@ import (
const (
devRemoteFork = "origin"
devRemoteUpstream = "margo"
devUpstreamURL = "https://git.kuroku.io/margo"
devUpstreamURL = "https://margo.sh/"
)
var (
@@ -64,6 +64,7 @@ func Main() {
runCmd,
startCmd,
devCmd,
ciCmd,
}
app.RunAndExitOnError()
}
Oops, something went wrong.

0 comments on commit 894c71e

Please sign in to comment.