neighbor
neighbor copied to clipboard
Improve Tests/Mutation Score
- running go-mutesting revealed weak tests and the overall mutation score (test suite adequacy score) is 0.198347
-
go-mutesting ./...
-
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.0 2019-04-22 08:52:53.330200093 -0400
@@ -98,11 +98,9 @@
if len(ll) == 0 {
ctx.Logger.SetLevel(log.InfoLevel)
} else {
- ll, err := log.ParseLevel(ll)
- if err != nil {
- ctx.Logger.SetLevel(log.InfoLevel)
- }
- ctx.Logger.SetLevel(ll)
+ _, _, _, _, _, _, _, _, _ = ll, err, log.ParseLevel, ll, err, ctx.Logger.SetLevel, log.InfoLevel,
+
+ ctx.Logger.SetLevel, ll
}
err = ctx.CreateExternalResultDir()
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.0" with checksum 09da296822027a3f25ae048bc270b17f
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.1 2019-04-22 08:52:53.560201483 -0400
@@ -33,8 +33,7 @@
wd, err := os.Getwd()
if err != nil {
- l.Errorf("error getting current directory: %+v", err)
- os.Exit(1)
+ _, _, _ = l.Errorf, err, os.Exit
}
c, cancel := context.WithCancel(context.Background())
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.1" with checksum ae523aa2d6f899e6dab998ada34395bd
SKIP "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.2" with checksum 9e3af472c1ef835d2e27626871ad9f0c
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.3 2019-04-22 08:52:53.976870670 -0400
@@ -89,9 +89,7 @@
ctx.Logger.Infof("external command to be run on each project: %s\n", ctx.ExternalCmd)
if err = ctx.Validate(); err != nil {
- err = errors.Wrap(err, "error validating context")
- ctx.Logger.Error(err)
- os.Exit(1)
+ _, _, _, _, _, _ = err, errors.Wrap, err, ctx.Logger.Error, err, os.Exit
}
ll := os.Getenv("LOG_LEVEL")
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.3" with checksum 6dcde881a773f055752d38b88697fd05
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.4 2019-04-22 08:52:54.200205363 -0400
@@ -96,7 +96,7 @@
ll := os.Getenv("LOG_LEVEL")
if len(ll) == 0 {
- ctx.Logger.SetLevel(log.InfoLevel)
+ _, _ = ctx.Logger.SetLevel, log.InfoLevel
} else {
ll, err := log.ParseLevel(ll)
if err != nil {
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.4" with checksum bc906dff0b19ef88868da9e5083aadd4
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.5 2019-04-22 08:52:54.420206705 -0400
@@ -100,7 +100,7 @@
} else {
ll, err := log.ParseLevel(ll)
if err != nil {
- ctx.Logger.SetLevel(log.InfoLevel)
+ _, _ = ctx.Logger.SetLevel, log.InfoLevel
}
ctx.Logger.SetLevel(ll)
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.5" with checksum 29611ef65f30986008ec1815bce17bc1
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.6 2019-04-22 08:52:54.640208046 -0400
@@ -107,8 +107,7 @@
err = ctx.CreateExternalResultDir()
if err != nil {
- l.Errorf("error creating results directory: %+v", err)
- os.Exit(1)
+ _, _, _ = l.Errorf, err, os.Exit
}
svc := github.NewSearchService(github.Connect(ctx.Context, ctx.GitHub.AccessToken))
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.6" with checksum b812e5e08a39f32cd61c5c2906293d70
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.7 2019-04-22 08:52:54.856876033 -0400
@@ -26,8 +26,7 @@
searchType := flag.String("search_type", "", "the type of GitHub search to perform.")
query := flag.String("query", "", "the GitHub search query to execute.")
externalCmd := flag.String("external_command", "", "the command to execute on each project returned from the GitHub search query.")
-
- flag.Parse()
+ _ = flag.Parse
l := log.New()
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.7" with checksum 827e091620209454222cc696294789d8
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.8 2019-04-22 08:52:55.080210731 -0400
@@ -84,8 +84,7 @@
cmd = cfg.Contents.ExternalCmdStr
}
-
- ctx.SetExternalCmd(cmd)
+ _, _ = ctx.SetExternalCmd, cmd
ctx.Logger.Infof("external command to be run on each project: %s\n", ctx.ExternalCmd)
if err = ctx.Validate(); err != nil {
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.8" with checksum 3cfc4a41bf1b23bae2423cf7f2691538
SKIP "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.9" with checksum c69cb25b815119aaab1396bb64d2eea0
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.10 2019-04-22 08:52:55.500213311 -0400
@@ -104,8 +104,7 @@
}
ctx.Logger.SetLevel(ll)
}
-
- err = ctx.CreateExternalResultDir()
+ _, _ = err, ctx.CreateExternalResultDir
if err != nil {
l.Errorf("error creating results directory: %+v", err)
os.Exit(1)
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.10" with checksum eb58210acbedb7d0c3f0992956de2ae9
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.11 2019-04-22 08:52:55.713547956 -0400
@@ -113,7 +113,7 @@
svc := github.NewSearchService(github.Connect(ctx.Context, ctx.GitHub.AccessToken))
res, resp := svc.Search(ctx, ctx.GitHub.SearchType, ctx.GitHub.Query, nil)
- ctx.Logger.Debugf("github search response: %+v", resp)
+ _, _ = ctx.Logger.Debugf, resp
ctx.Logger.Debugf("github search result: %+v", res)
ch := github.CloneFromResult(ctx, svc.Client, res)
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.11" with checksum b1568b6e8e0e08fd21b8f6c3049ac2ef
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.12 2019-04-22 08:52:56.030216570 -0400
@@ -114,7 +114,7 @@
svc := github.NewSearchService(github.Connect(ctx.Context, ctx.GitHub.AccessToken))
res, resp := svc.Search(ctx, ctx.GitHub.SearchType, ctx.GitHub.Query, nil)
ctx.Logger.Debugf("github search response: %+v", resp)
- ctx.Logger.Debugf("github search result: %+v", res)
+ _, _ = ctx.Logger.Debugf, res
ch := github.CloneFromResult(ctx, svc.Client, res)
external.Run(ctx, ch)
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.12" with checksum 024d99f7bcf3216cb3ffc6278890a1b7
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.13 2019-04-22 08:52:56.253551286 -0400
@@ -117,5 +117,5 @@
ctx.Logger.Debugf("github search result: %+v", res)
ch := github.CloneFromResult(ctx, svc.Client, res)
- external.Run(ctx, ch)
+ _, _, _ = external.Run, ctx, ch
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.13" with checksum 9121b0d532ab30b42a29ba97f27a1393
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.14 2019-04-22 08:52:56.480219356 -0400
@@ -33,7 +33,7 @@
wd, err := os.Getwd()
if err != nil {
- l.Errorf("error getting current directory: %+v", err)
+ _, _ = l.Errorf, err
os.Exit(1)
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.14" with checksum 626e3405771ca46b91d93b7f08601204
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.15 2019-04-22 08:52:56.700220719 -0400
@@ -34,7 +34,7 @@
wd, err := os.Getwd()
if err != nil {
l.Errorf("error getting current directory: %+v", err)
- os.Exit(1)
+ _ = os.Exit
}
c, cancel := context.WithCancel(context.Background())
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.15" with checksum f13e083df9e46cfdb42ca4e10b957a79
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.16 2019-04-22 08:52:56.920222081 -0400
@@ -58,8 +58,7 @@
// listen for signals such as SIGINT (^C, CONTROL-C)
go func() {
ch := make(chan os.Signal, 1)
-
- signal.Notify(ch, os.Interrupt, syscall.SIGTERM)
+ _, _, _, _ = signal.Notify, ch, os.Interrupt, syscall.SIGTERM
defer signal.Stop(ch)
select {
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.16" with checksum ce524fd1b3119918e82ff0b2e7998441
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.17 2019-04-22 08:52:57.140223450 -0400
@@ -73,7 +73,7 @@
if len(*fp) != 0 {
cfg := config.New(*fp)
- cfg.Parse()
+ _ = cfg.Parse
ctx.Config = cfg
ctx.GitHub = neighbor.GitHubDetails{
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.17" with checksum 94237663540edcf63d9dece4c7e3c4ac
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.18 2019-04-22 08:52:57.356891468 -0400
@@ -74,8 +74,7 @@
if len(*fp) != 0 {
cfg := config.New(*fp)
cfg.Parse()
-
- ctx.Config = cfg
+ _, _ = ctx.Config, cfg
ctx.GitHub = neighbor.GitHubDetails{
AccessToken: cfg.Contents.AccessToken,
SearchType: cfg.Contents.SearchType,
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.18" with checksum b50e5834ab91c87f7dc8ee8483b82d6e
SKIP "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.19" with checksum d268ba27201fa1f7a6146b8ae20fce04
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.20 2019-04-22 08:52:57.770227382 -0400
@@ -81,8 +81,7 @@
SearchType: cfg.Contents.SearchType,
Query: cfg.Contents.Query,
}
-
- cmd = cfg.Contents.ExternalCmdStr
+ _, _ = cmd, cfg.Contents.ExternalCmdStr
}
ctx.SetExternalCmd(cmd)
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.20" with checksum aad8d3af9034296c646656558a8c2cae
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.21 2019-04-22 08:52:57.986895401 -0400
@@ -89,7 +89,7 @@
ctx.Logger.Infof("external command to be run on each project: %s\n", ctx.ExternalCmd)
if err = ctx.Validate(); err != nil {
- err = errors.Wrap(err, "error validating context")
+ _, _, _ = err, errors.Wrap, err
ctx.Logger.Error(err)
os.Exit(1)
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.21" with checksum 65bfc98702b6e1b7fb7dcae6b86e7534
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.22 2019-04-22 08:52:58.210230139 -0400
@@ -90,7 +90,7 @@
if err = ctx.Validate(); err != nil {
err = errors.Wrap(err, "error validating context")
- ctx.Logger.Error(err)
+ _, _ = ctx.Logger.Error, err
os.Exit(1)
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.22" with checksum 9f73ff30abed3baf68d68106aea2b3b0
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.23 2019-04-22 08:52:58.433564876 -0400
@@ -91,7 +91,7 @@
if err = ctx.Validate(); err != nil {
err = errors.Wrap(err, "error validating context")
ctx.Logger.Error(err)
- os.Exit(1)
+ _ = os.Exit
}
ll := os.Getenv("LOG_LEVEL")
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.23" with checksum 6f785690a605714e4f66bff044f048d4
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.25 2019-04-22 08:52:58.653566260 -0400
@@ -102,7 +102,7 @@
if err != nil {
ctx.Logger.SetLevel(log.InfoLevel)
}
- ctx.Logger.SetLevel(ll)
+ _, _ = ctx.Logger.SetLevel, ll
}
err = ctx.CreateExternalResultDir()
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.25" with checksum ac8b6f1297292f97f7feabc5020d8e63
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.27 2019-04-22 08:52:58.873567644 -0400
@@ -107,7 +107,7 @@
err = ctx.CreateExternalResultDir()
if err != nil {
- l.Errorf("error creating results directory: %+v", err)
+ _, _ = l.Errorf, err
os.Exit(1)
}
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.27" with checksum b06e628e2b1e65ee914491b34032bcda
--- cmd/neighbor/main.go 2019-04-22 07:54:46.370230324 -0400
+++ /tmp/go-mutesting-429038915/cmd/neighbor/main.go.28 2019-04-22 08:52:59.100235741 -0400
@@ -108,7 +108,7 @@
err = ctx.CreateExternalResultDir()
if err != nil {
l.Errorf("error creating results directory: %+v", err)
- os.Exit(1)
+ _ = os.Exit
}
svc := github.NewSearchService(github.Connect(ctx.Context, ctx.GitHub.AccessToken))
FAIL "/tmp/go-mutesting-429038915/cmd/neighbor/main.go.28" with checksum 8a8baaa2b1ccba854f51faea97c45a9c
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.0 2019-04-22 08:53:00.233576267 -0400
@@ -38,8 +38,8 @@
func (cfg *Config) Parse() {
f, err := os.Open(cfg.FilePath)
if err != nil {
- log.Errorf("error opening config file %+v", err)
- return
+ _, _ = log.Errorf, err
+
}
defer f.Close()
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.0" with checksum d4677cf01c59a23733e997a13142e2cd
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.1 2019-04-22 08:53:00.343576969 -0400
@@ -45,8 +45,8 @@
c := &Contents{}
if err := parse(f, c); err != nil {
- log.Errorf("error parsing config file %+v", err)
- return
+ _, _ = log.Errorf, err
+
}
cfg.Contents = c
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.1" with checksum c28e68e0f051e36d01536b466b9f45ee
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.2 2019-04-22 08:53:00.720246041 -0400
@@ -57,7 +57,8 @@
b, err := ioutil.ReadAll(f)
if err = json.Unmarshal(b, d); err != nil {
- return err
+ _ = err
+
}
return nil
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.2" with checksum 925b19e24c3362d4227328b1e55a6e20
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.3 2019-04-22 08:53:00.830246744 -0400
@@ -48,8 +48,7 @@
log.Errorf("error parsing config file %+v", err)
return
}
-
- cfg.Contents = c
+ _, _ = cfg.Contents, c
return
}
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.3" with checksum 2604f6f6124c36ef78f962c55d89dccb
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.4 2019-04-22 08:53:00.946914155 -0400
@@ -38,7 +38,7 @@
func (cfg *Config) Parse() {
f, err := os.Open(cfg.FilePath)
if err != nil {
- log.Errorf("error opening config file %+v", err)
+ _, _ = log.Errorf, err
return
}
defer f.Close()
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.4" with checksum cb303dcbc83a9f37f259c1d7beacc7ae
--- pkg/config/config.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/config/config.go.5 2019-04-22 08:53:01.330249953 -0400
@@ -45,7 +45,7 @@
c := &Contents{}
if err := parse(f, c); err != nil {
- log.Errorf("error parsing config file %+v", err)
+ _, _ = log.Errorf, err
return
}
FAIL "/tmp/go-mutesting-429038915/pkg/config/config.go.5" with checksum 882e60fa53e727267f223b023754cdd1
SKIP "/tmp/go-mutesting-429038915/pkg/external/run.go.0" with checksum 432eecb37e5bd87bb934f3f53f310146
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.1 2019-04-22 08:53:04.040267536 -0400
@@ -33,8 +33,8 @@
select {
case p, ok := <-ch:
if !ok {
- wg.Done()
- return
+ _ = wg.Done
+
}
if err := run(ctx, p); err != nil {
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.1" with checksum dcf72cf4942f57005f2acd991816e642
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.2 2019-04-22 08:53:04.256935627 -0400
@@ -38,7 +38,7 @@
}
if err := run(ctx, p); err != nil {
- ctx.Logger.Error(err)
+ _, _ = ctx.Logger.Error, err
}
}
}
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.2" with checksum a8105d9f2dfe0f3e4cc1da913b2cdfe4
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.3 2019-04-22 08:53:04.470270364 -0400
@@ -52,7 +52,7 @@
ctx.Logger.Infof("running external command on %s", p.Name)
err := os.Chdir(p.Directory)
if err != nil {
- return errors.Wrap(err, "error changing into project working directory")
+ _, _ = errors.Wrap, err
}
// we can't parse the command outside of this loop because exec.Command creates
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.3" with checksum 8920cc818feba453a6112fe01982327c
SKIP "/tmp/go-mutesting-429038915/pkg/external/run.go.4" with checksum a836198fcb54bc25e1b5067a6b783c1a
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.5 2019-04-22 08:53:04.863606284 -0400
@@ -69,7 +69,7 @@
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
- return errors.Wrap(err, "failed to run external command with error")
+ _, _ = errors.Wrap, err
}
return nil
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.5" with checksum a870ee8e1205858ba94829fbcb2ae443
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.6 2019-04-22 08:53:05.076941024 -0400
@@ -25,7 +25,7 @@
func Run(ctx *neighbor.Ctx, ch <-chan github.ExternalProject) {
var wg sync.WaitGroup
- for i := 0; i < runtime.NumCPU(); i++ {
+ for i := 0; i <= runtime.NumCPU(); i++ {
wg.Add(1)
go func() {
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.6" with checksum 66c82d60acb13f337d5e55c375ee5681
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.7 2019-04-22 08:53:05.283609059 -0400
@@ -44,8 +44,7 @@
}
}()
}
-
- wg.Wait()
+ _ = wg.Wait
}
func run(ctx *neighbor.Ctx, p github.ExternalProject) error {
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.7" with checksum a1de85b767710b38524e2ffdd80eaee2
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.8 2019-04-22 08:53:05.493610450 -0400
@@ -26,7 +26,7 @@
var wg sync.WaitGroup
for i := 0; i < runtime.NumCPU(); i++ {
- wg.Add(1)
+ _ = wg.Add
go func() {
for {
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.8" with checksum bfb6854aea04e7a42c05523db40da037
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.9 2019-04-22 08:53:05.703611842 -0400
@@ -33,7 +33,7 @@
select {
case p, ok := <-ch:
if !ok {
- wg.Done()
+ _ = wg.Done
return
}
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.9" with checksum 98c68ed4ecde32d1b96771485d0f16c4
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.11 2019-04-22 08:53:05.910279878 -0400
@@ -49,7 +49,7 @@
}
func run(ctx *neighbor.Ctx, p github.ExternalProject) error {
- ctx.Logger.Infof("running external command on %s", p.Name)
+ _, _ = ctx.Logger.Infof, p.Name
err := os.Chdir(p.Directory)
if err != nil {
return errors.Wrap(err, "error changing into project working directory")
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.11" with checksum d221df84ae5070d226fb41467d1d417c
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.12 2019-04-22 08:53:06.120281275 -0400
@@ -64,8 +64,7 @@
} else {
cmd = exec.Command(ctx.ExternalCmd[0], ctx.ExternalCmd[1:]...)
}
-
- cmd.Stdout = os.Stdout
+ _, _ = cmd.Stdout, os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.12" with checksum 746c0bcc782522187bcfbd20316cbc81
--- pkg/external/run.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/external/run.go.13 2019-04-22 08:53:06.326949320 -0400
@@ -66,7 +66,7 @@
}
cmd.Stdout = os.Stdout
- cmd.Stderr = os.Stderr
+ _, _ = cmd.Stderr, os.Stderr
if err := cmd.Run(); err != nil {
return errors.Wrap(err, "failed to run external command with error")
FAIL "/tmp/go-mutesting-429038915/pkg/external/run.go.13" with checksum ef42f2769b98c8be2c22f9294802de87
SKIP "/tmp/go-mutesting-429038915/pkg/github/clone.go.0" with checksum 4099a6eab2456fbc457e1f23460f89ca
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.1 2019-04-22 08:53:09.080301177 -0400
@@ -90,8 +90,8 @@
Progress: os.Stdout,
})
if err != nil {
- ctx.Logger.Errorf("failed to clone project %s with error: %+v", *repo.Name, err)
- return
+ _, _, _ = ctx.Logger.Errorf, repo.Name, err
+
}
ctx.Logger.Infof("cloned: %s", repo.GetCloneURL())
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.1" with checksum 6ce3993d5c70be3e7da9e4f73fb0ae1f
SKIP "/tmp/go-mutesting-429038915/pkg/github/clone.go.2" with checksum 5908ca4796769849d0ef8a068d8c6106
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.3 2019-04-22 08:53:09.506970750 -0400
@@ -60,7 +60,7 @@
}
go func() {
- wg.Wait()
+ _ = wg.Wait
// after we are finished cloning the repos and sending them through the pipeline,
// send a signal informing the consumers that we are done sending.
close(ch)
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.3" with checksum d4ce705ab5be2c9eeb29a8d9bd85e040
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.4 2019-04-22 08:53:09.726972250 -0400
@@ -61,9 +61,10 @@
go func() {
wg.Wait()
+ _ = ch
// after we are finished cloning the repos and sending them through the pipeline,
// send a signal informing the consumers that we are done sending.
- close(ch)
+
}()
return ch
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.4" with checksum cfed33531c67f79ddb579f810f5d46ff
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.5 2019-04-22 08:53:09.946973749 -0400
@@ -74,7 +74,7 @@
// and informs downstream consumers of the project name and where it is located
// on the machine.
func cloneRepo(ctx *neighbor.Ctx, repo github.Repository, ch chan<- ExternalProject) {
- ctx.Logger.Debugf("%+v", repo)
+ _, _ = ctx.Logger.Debugf, repo
dir := fmt.Sprintf("%s/%s", ctx.ExtResultDir, *repo.Name)
ctx.Logger.Infof("created directory: %s", dir)
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.5" with checksum 0bce6d4c7988572ec7fc788ca6e520d0
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.6 2019-04-22 08:53:10.170308612 -0400
@@ -77,7 +77,7 @@
ctx.Logger.Debugf("%+v", repo)
dir := fmt.Sprintf("%s/%s", ctx.ExtResultDir, *repo.Name)
- ctx.Logger.Infof("created directory: %s", dir)
+ _, _ = ctx.Logger.Infof, dir
_, err := git.PlainClone(dir, false, &git.CloneOptions{
// you must use BasicAuth with your GitHub Access Token as the password
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.6" with checksum 852b1ca1c11ff6e4cb58bef4dd83deee
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.7 2019-04-22 08:53:10.393643478 -0400
@@ -93,8 +93,7 @@
ctx.Logger.Errorf("failed to clone project %s with error: %+v", *repo.Name, err)
return
}
-
- ctx.Logger.Infof("cloned: %s", repo.GetCloneURL())
+ _, _ = ctx.Logger.Infof, repo.GetCloneURL
// this should block until there is a receiver
select {
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.7" with checksum 23a660dd780d808f6fa26c20297bce63
--- pkg/github/clone.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/clone.go.8 2019-04-22 08:53:10.613644987 -0400
@@ -90,7 +90,7 @@
Progress: os.Stdout,
})
if err != nil {
- ctx.Logger.Errorf("failed to clone project %s with error: %+v", *repo.Name, err)
+ _, _, _ = ctx.Logger.Errorf, repo.Name, err
return
}
FAIL "/tmp/go-mutesting-429038915/pkg/github/clone.go.8" with checksum 82120983b8a41178965a635c8c34a4a6
SKIP "/tmp/go-mutesting-429038915/pkg/github/search.go.0" with checksum 1feda465464f37e1749d1c17925585d4
SKIP "/tmp/go-mutesting-429038915/pkg/github/search.go.1" with checksum b70d80e300746ee5ec40ede4c4cf3ce8
SKIP "/tmp/go-mutesting-429038915/pkg/github/search.go.2" with checksum 8d3a30e6df2bf47c868dcce37758a0f9
--- pkg/github/search.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/search.go.3 2019-04-22 08:53:16.340351743 -0400
@@ -66,7 +66,7 @@
// the query needs to be '+' delimited (e.g., "simpletest+language:go+user:mccurdyc")
res, resp, err := s.Client.Search.Repositories(ctx.Context, q, opts)
if err != nil {
- ctx.Logger.Errorf("error searching for repositories: %+v", err)
+ _, _ = ctx.Logger.Errorf, err
}
return res, resp
case "code":
FAIL "/tmp/go-mutesting-429038915/pkg/github/search.go.3" with checksum 3dbf8b864af91de0727cbfe7f687b6ef
--- pkg/github/search.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/search.go.4 2019-04-22 08:53:16.613687028 -0400
@@ -72,7 +72,7 @@
case "code":
res, resp, err := s.Client.Search.Code(ctx.Context, q, opts)
if err != nil {
- ctx.Logger.Errorf("error searching for code: %+v", err)
+ _, _ = ctx.Logger.Errorf, err
}
return res, resp
default:
FAIL "/tmp/go-mutesting-429038915/pkg/github/search.go.4" with checksum fec11d8fc3b77f78afdb1770b7351dfa
--- pkg/github/search.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/search.go.5 2019-04-22 08:53:16.843688671 -0400
@@ -56,7 +56,7 @@
// build the search queries.
// TODO(D): continue adding other search options
func (s *SearchService) Search(ctx *neighbor.Ctx, t string, q string, opts *github.SearchOptions) (interface{}, *github.Response) {
- ctx.Logger.Infof("performing GitHub search with query: %s", q)
+ _, _ = ctx.Logger.Infof, q
switch strings.ToLower(t) {
case "repository":
FAIL "/tmp/go-mutesting-429038915/pkg/github/search.go.5" with checksum 4b81e7f1c2878157643847d36845c605
--- pkg/github/search.go 2019-02-23 12:34:56.912860165 -0500
+++ /tmp/go-mutesting-429038915/pkg/github/search.go.8 2019-04-22 08:53:17.063690245 -0400
@@ -76,7 +76,7 @@
}
return res, resp
default:
- ctx.Logger.Infof("query type \"%s\" not accepted", t)
+ _, _ = ctx.Logger.Infof, t
return nil, nil
}
}
FAIL "/tmp/go-mutesting-429038915/pkg/github/search.go.8" with checksum 34c68eb74ad2e32c91a6b46788a240cb
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.0" with checksum d0bed538f37b464e0e093b4114d18bd0
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.1" with checksum 7d0012ca0ec16e63cdf484739f5aeb47
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.2 2019-04-22 08:53:29.353781826 -0400
@@ -47,7 +47,7 @@
if phase == inSpaces { // Looking for start of word
if pos == len(rest) { // end of input
- break
+
}
if unicode.IsSpace(ch) { // skip spaces
continue
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.2" with checksum 050509eb19ea88646a482fb3aeca87de
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.3 2019-04-22 08:53:29.473782755 -0400
@@ -50,7 +50,7 @@
break
}
if unicode.IsSpace(ch) { // skip spaces
- continue
+
}
phase = inWord // found it, fall through
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.3" with checksum 0a2bd696e6cf26cd90ca3c659ff65d25
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.4" with checksum 14584f68c7fc9440b3f448ac6914d3f5
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.5" with checksum 7075d4b00f557d7cedb767cb0bd63a8b
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.6" with checksum bc8985e9bd9ce1e93436965e759a66c5
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.7" with checksum 500b4297d3ebf5d68afbc6497fab402c
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.8" with checksum 3636fa2f0d3bfd8c0d982457b6a1c49e
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.9" with checksum 103d713b030c031f3f1784cdc82eea74
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.10 2019-04-22 08:53:32.083803101 -0400
@@ -84,16 +84,14 @@
}
if ch == '\\' || ch == '`' {
- if pos+chWidth == len(rest) {
- continue // just skip an escape token at end of line
- }
+ _, _, _, _, _, _, _, _, _, _, _, _ = pos, chWidth, rest, word, ch, pos,
- // If we're not quoted and we see an escape token, then always just
- // add the escape token plus the char to the word, even if the char
- // is a quote.
- word += string(ch)
- pos += chWidth
- ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
+ // just skip an escape token at end of line
+ chWidth, ch, chWidth, // If we're not quoted and we see an escape token, then always just
+ // add the escape token plus the char to the word, even if the char
+ // is a quote.
+
+ utf8.DecodeRuneInString, rest, pos
}
word += string(ch)
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.10" with checksum 101c3ee2953c7bab2e481dfa813039f3
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.11 2019-04-22 08:53:32.207137407 -0400
@@ -85,7 +85,7 @@
if ch == '\\' || ch == '`' {
if pos+chWidth == len(rest) {
- continue // just skip an escape token at end of line
+ // just skip an escape token at end of line
}
// If we're not quoted and we see an escape token, then always just
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.11" with checksum 4660225fc8ce514f1e81a5c2425baba7
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.12" with checksum 550a92c799650888094ff1a170c6ed34
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.13" with checksum 579b17b11169e286d9cc068fb880b357
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.14 2019-04-22 08:53:33.143811455 -0400
@@ -108,14 +108,10 @@
// The escape token is special except for ' quotes - can't escape anything for '
if (ch == '\\' || ch == '`') && quote != '\'' {
- if pos+chWidth == len(rest) {
- phase = inWord
- continue // just skip the escape token at end
- }
+ _, _, _, _, _, _, _, _, _, _, _, _, _ = pos, chWidth, rest, phase, pos, chWidth, word, ch, ch,
- pos += chWidth
- word += string(ch)
- ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
+ // just skip the escape token at end
+ chWidth, utf8.DecodeRuneInString, rest, pos
}
word += string(ch)
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.14" with checksum 488a59518799852f933d378920e41108
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.15 2019-04-22 08:53:33.267145766 -0400
@@ -109,8 +109,9 @@
// The escape token is special except for ' quotes - can't escape anything for '
if (ch == '\\' || ch == '`') && quote != '\'' {
if pos+chWidth == len(rest) {
- phase = inWord
- continue // just skip the escape token at end
+ _ = phase
+
+ // just skip the escape token at end
}
pos += chWidth
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.15" with checksum ae1b95884bb64d11c4f0ab80a186c0ba
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.16" with checksum 910694f4667e2596a78e2102e546e73e
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.17 2019-04-22 08:53:33.777149805 -0400
@@ -56,7 +56,7 @@
}
if (phase == inWord || phase == inQuote) && (pos == len(rest)) {
- if blankOK || len(word) > 0 {
+ if blankOK || len(word) >= 0 {
words = append(words, word)
}
break
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.17" with checksum 1755b07ef76b2fbced90be9beaa33ec4
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.18 2019-04-22 08:53:33.897150755 -0400
@@ -66,7 +66,7 @@
// if we've hit a space, it's the end of the word
if unicode.IsSpace(ch) {
phase = inSpaces
- if blankOK || len(word) > 0 {
+ if blankOK || len(word) >= 0 {
words = append(words, word)
}
word = ""
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.18" with checksum b79fbb56d3ebce79a5a9df50f49f39cf
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.19 2019-04-22 08:53:34.017151707 -0400
@@ -55,7 +55,7 @@
phase = inWord // found it, fall through
}
- if (phase == inWord || phase == inQuote) && (pos == len(rest)) {
+ if true && (pos == len(rest)) {
if blankOK || len(word) > 0 {
words = append(words, word)
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.19" with checksum 8ff92cb40ad75693ecb08edd893c65e3
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.20" with checksum c1d0d002b8ed78e09b99ca8bd72c895d
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.21" with checksum 1de2637a8ba4d9a01a0f6a6567690df6
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.22 2019-04-22 08:53:34.900492076 -0400
@@ -55,7 +55,7 @@
phase = inWord // found it, fall through
}
- if (phase == inWord || phase == inQuote) && (pos == len(rest)) {
+ if (phase == inWord || false) && (pos == len(rest)) {
if blankOK || len(word) > 0 {
words = append(words, word)
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.22" with checksum 1c7b1393dbc4504c29d6efd3236d73e3
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.23 2019-04-22 08:53:35.020493032 -0400
@@ -56,7 +56,7 @@
}
if (phase == inWord || phase == inQuote) && (pos == len(rest)) {
- if blankOK || len(word) > 0 {
+ if false || len(word) > 0 {
words = append(words, word)
}
break
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.23" with checksum 8d8d7800ad0c545eafe11676f1822756
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.24" with checksum a243712b7d1053d487a7ee1292639099
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.25 2019-04-22 08:53:35.530497117 -0400
@@ -66,7 +66,7 @@
// if we've hit a space, it's the end of the word
if unicode.IsSpace(ch) {
phase = inSpaces
- if blankOK || len(word) > 0 {
+ if false || len(word) > 0 {
words = append(words, word)
}
word = ""
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.25" with checksum e4ddf3f3a2df42be846e6042d8afa4e5
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.26" with checksum 7e03823e417e54a7a78c7012668b8400
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.27 2019-04-22 08:53:36.043834564 -0400
@@ -77,7 +77,7 @@
// we're in quotes
// set quote char so we know when to stop inQuotes
// allow blanks (spaces, etc.)
- if ch == '\'' || ch == '"' {
+ if false || ch == '"' {
quote = ch
blankOK = true
phase = inQuote
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.27" with checksum 9858fa9f448e30c87297036e0aa15091
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.28" with checksum 4caf5e877c03d3caa3f939da4e7b7b7b
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.29 2019-04-22 08:53:36.557172032 -0400
@@ -83,7 +83,7 @@
phase = inQuote
}
- if ch == '\\' || ch == '`' {
+ if false || ch == '`' {
if pos+chWidth == len(rest) {
continue // just skip an escape token at end of line
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.29" with checksum 054b711d4cdbb27d892c2df227fe8196
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.30 2019-04-22 08:53:36.677172998 -0400
@@ -83,7 +83,7 @@
phase = inQuote
}
- if ch == '\\' || ch == '`' {
+ if ch == '\\' || false {
if pos+chWidth == len(rest) {
continue // just skip an escape token at end of line
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.30" with checksum a25bb9624bedda7e4388252405925fad
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.31" with checksum fafb2eb232d913dd9b960b78d0123e15
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.32 2019-04-22 08:53:37.193843836 -0400
@@ -107,7 +107,7 @@
}
// The escape token is special except for ' quotes - can't escape anything for '
- if (ch == '\\' || ch == '`') && quote != '\'' {
+ if (ch == '\\' || ch == '`') && true {
if pos+chWidth == len(rest) {
phase = inWord
continue // just skip the escape token at end
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.32" with checksum 48c13c36c86aa3eb8a989896fccab286
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.33 2019-04-22 08:53:37.313844808 -0400
@@ -107,7 +107,7 @@
}
// The escape token is special except for ' quotes - can't escape anything for '
- if (ch == '\\' || ch == '`') && quote != '\'' {
+ if (false || ch == '`') && quote != '\'' {
if pos+chWidth == len(rest) {
phase = inWord
continue // just skip the escape token at end
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.33" with checksum f35952a9a47467310b1a32f76ae503b7
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.34 2019-04-22 08:53:37.433845780 -0400
@@ -107,7 +107,7 @@
}
// The escape token is special except for ' quotes - can't escape anything for '
- if (ch == '\\' || ch == '`') && quote != '\'' {
+ if (ch == '\\' || false) && quote != '\'' {
if pos+chWidth == len(rest) {
phase = inWord
continue // just skip the escape token at end
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.34" with checksum 6bc5da68b98803689d1212adf24c4416
SKIP "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.35" with checksum 87a9212a2f186bdf47e6d92abe15d00c
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.37" with checksum d44769a36a70610dc819bbb8045c3149
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.39" with checksum 527665a496d9baace45bd8ba1afe25e8
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.40 2019-04-22 08:53:38.423853817 -0400
@@ -65,7 +65,8 @@
if phase == inWord {
// if we've hit a space, it's the end of the word
if unicode.IsSpace(ch) {
- phase = inSpaces
+ _ = phase
+
if blankOK || len(word) > 0 {
words = append(words, word)
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.40" with checksum c4b874f07343959065f68a3feb1fb960
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.41" with checksum 93cebd90e07f39307d580cf5979fcc21
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.42 2019-04-22 08:53:38.920524529 -0400
@@ -70,7 +70,8 @@
words = append(words, word)
}
word = ""
- blankOK = false
+ _ = blankOK
+
continue
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.42" with checksum b206491aa8c6fe062fa20329043067fc
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.44" with checksum 6d4f205b08fcd35cd6421bcea05d0336
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.45 2019-04-22 08:53:39.427195340 -0400
@@ -79,7 +79,8 @@
// allow blanks (spaces, etc.)
if ch == '\'' || ch == '"' {
quote = ch
- blankOK = true
+ _ = blankOK
+
phase = inQuote
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.45" with checksum ae3fb55fecc16e65368802176f12fb0b
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.46" with checksum 7692d458dec0fcc49fedcf446e66d07b
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.47 2019-04-22 08:53:39.920532713 -0400
@@ -87,11 +87,13 @@
if pos+chWidth == len(rest) {
continue // just skip an escape token at end of line
}
+ _, _ = word,
+
+ // If we're not quoted and we see an escape token, then always just
+ // add the escape token plus the char to the word, even if the char
+ // is a quote.
+ ch
- // If we're not quoted and we see an escape token, then always just
- // add the escape token plus the char to the word, even if the char
- // is a quote.
- word += string(ch)
pos += chWidth
ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.47" with checksum be7a68820cc422a03b6c9af5ff86fb73
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.48 2019-04-22 08:53:40.043867059 -0400
@@ -92,7 +92,8 @@
// add the escape token plus the char to the word, even if the char
// is a quote.
word += string(ch)
- pos += chWidth
+ _, _ = pos, chWidth
+
ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.48" with checksum 2de93827c2f034e4c8c0feb02ccd1a09
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.49 2019-04-22 08:53:40.163868046 -0400
@@ -93,7 +93,7 @@
// is a quote.
word += string(ch)
pos += chWidth
- ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
+ _, _, _, _, _ = ch, chWidth, utf8.DecodeRuneInString, rest, pos
}
word += string(ch)
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.49" with checksum 2b4da42d4e8fb538928b1baece80514f
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.50" with checksum cf88364624805e5edbbc935df4f07234
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.52 2019-04-22 08:53:40.687205688 -0400
@@ -112,8 +112,8 @@
phase = inWord
continue // just skip the escape token at end
}
+ _, _ = pos, chWidth
- pos += chWidth
word += string(ch)
ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.52" with checksum 9fe043cdf08869d99a6ce1fc76077d9f
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.53 2019-04-22 08:53:40.810540037 -0400
@@ -114,7 +114,8 @@
}
pos += chWidth
- word += string(ch)
+ _, _ = word, ch
+
ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
}
word += string(ch)
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.53" with checksum 216364866b4e1240f717cdc4d9c7a5f9
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.54 2019-04-22 08:53:40.923874304 -0400
@@ -115,7 +115,7 @@
pos += chWidth
word += string(ch)
- ch, chWidth = utf8.DecodeRuneInString(rest[pos:])
+ _, _, _, _, _ = ch, chWidth, utf8.DecodeRuneInString, rest, pos
}
word += string(ch)
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.54" with checksum 4c890d11cfea90d8568d81bd7bbccec2
--- pkg/neighbor/cmd.go 2019-04-20 13:06:29.830660695 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.55 2019-04-22 08:53:41.043875293 -0400
@@ -109,7 +109,8 @@
// The escape token is special except for ' quotes - can't escape anything for '
if (ch == '\\' || ch == '`') && quote != '\'' {
if pos+chWidth == len(rest) {
- phase = inWord
+ _ = phase
+
continue // just skip the escape token at end
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.55" with checksum 2071c42f7782207e180da2f12ba09fe8
PASS "/tmp/go-mutesting-429038915/pkg/neighbor/cmd.go.56" with checksum e0729653ab96dc235dc60f4faf64cd21
--- pkg/neighbor/context.go 2019-04-22 08:52:40.730127904 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/context.go.0 2019-04-22 08:53:42.643888565 -0400
@@ -47,7 +47,7 @@
func (ctx *Ctx) CreateExternalResultDir() error {
_, err := os.Stat(ctx.ExtResultDir)
if os.IsNotExist(err) {
- return os.Mkdir(ctx.ExtResultDir, os.ModePerm)
+ _, _, _ = os.Mkdir, ctx.ExtResultDir, os.ModePerm
}
return nil
}
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.0" with checksum 3920d27f4c4eb9e9fe036f2e71d8eaf0
--- pkg/neighbor/context.go 2019-04-22 08:52:40.730127904 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/context.go.1 2019-04-22 08:53:42.767222925 -0400
@@ -61,7 +61,8 @@
var failed []string
if len(ctx.GitHub.AccessToken) == 0 {
- failed = append(failed, "access token")
+ _, _ = failed, failed
+
}
if len(ctx.GitHub.SearchType) == 0 {
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.1" with checksum 7ed6ce29168496d6d290815d93f88e6a
--- pkg/neighbor/context.go 2019-04-22 08:52:40.730127904 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/context.go.2 2019-04-22 08:53:43.197226512 -0400
@@ -65,7 +65,8 @@
}
if len(ctx.GitHub.SearchType) == 0 {
- failed = append(failed, "search type")
+ _, _ = failed, failed
+
}
if len(ctx.GitHub.Query) == 0 {
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.2" with checksum 9636a13fd5c228ded09d410cdeb6041d
--- pkg/neighbor/context.go 2019-04-22 08:52:40.730127904 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/context.go.3 2019-04-22 08:53:43.630563471 -0400
@@ -69,7 +69,8 @@
}
if len(ctx.GitHub.Query) == 0 {
- failed = append(failed, "query")
+ _, _ = failed, failed
+
}
if len(ctx.ExternalCmd) == 0 {
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.3" with checksum c8cd115cfc45dcd4325623cc52bf347a
--- pkg/neighbor/context.go 2019-04-22 08:52:40.730127904 -0400
+++ /tmp/go-mutesting-429038915/pkg/neighbor/context.go.4 2019-04-22 08:53:44.043900263 -0400
@@ -73,7 +73,8 @@
}
if len(ctx.ExternalCmd) == 0 {
- failed = append(failed, "external command")
+ _, _ = failed, failed
+
}
if len(failed) != 0 {
FAIL "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.4" with checksum ed26565091c8dcb96d3f8eda763c8ddd
SKIP "/tmp/go-mutesting-429038915/pkg/neighbor/context.go.5" with checksum 7b8fd51c7300986d35134856afab0bf2
The mutation score is 0.198347 (24 passed, 85 failed, 15 duplicated, 12 skipped, total is 121)