zephinzer/godev

View on GitHub

Showing 18 of 18 total issues

Colors has 23 methods (exceeds 20 allowed). Consider refactoring.
Open

type Colors struct{}
Severity: Minor
Found in colors.go - About 2 hrs to fix

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (s *GitInitialiserTestSuite) TestConfirm() {
    reader := bufio.NewReader(strings.NewReader("y\n"))
    assert.True(s.T(), s.gitInitialiser.Confirm(reader))
    reader = bufio.NewReader(strings.NewReader("n\n"))
    assert.False(s.T(), s.gitInitialiser.Confirm(reader))
    Severity: Minor
    Found in initialiser.git_test.go and 1 other location - About 50 mins to fix
    initialiser.file_test.go on lines 58..63

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (s *FileInitialiserTestSuite) TestConfirm() {
    reader := bufio.NewReader(strings.NewReader("y\n"))
    assert.True(s.T(), s.fileInitialiser.Confirm(reader))
    reader = bufio.NewReader(strings.NewReader("n\n"))
    assert.False(s.T(), s.fileInitialiser.Confirm(reader))
    Severity: Minor
    Found in initialiser.file_test.go and 1 other location - About 50 mins to fix
    initialiser.git_test.go on lines 68..73

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (s *WatcherTestSuite) Test_pathIsDirectory() {
    w := &Watcher{}
    cwd := s.currentDirectory
    assert.Truef(s.T(), w.pathIsDirectory(cwd), "expected '%s' (current working directory) to be a directory but it was not", cwd)
     
     
    Severity: Minor
    Found in watcher_test.go and 1 other location - About 40 mins to fix
    watcher_test.go on lines 168..175

    Similar blocks of code found in 2 locations. Consider refactoring.
    Open

    func (s *WatcherTestSuite) Test_pathExists() {
    w := &Watcher{}
    cwd := s.currentDirectory
    assert.Truef(s.T(), w.pathExists(cwd), "expected '%s' (current working directory) to exist but it did not", cwd)
     
     
    Severity: Minor
    Found in watcher_test.go and 1 other location - About 40 mins to fix
    watcher_test.go on lines 177..184

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    func (s *LoggerTestSuite) TestWarn() {
    s.logger.Warn("Warn")
    s.logger.Warnf("%s", "nraW")
    assert.Contains(s.T(), s.logs.String(), "Warn")
    assert.Contains(s.T(), s.logs.String(), "nraW")
    Severity: Major
    Found in logger_test.go and 4 other locations - About 40 mins to fix
    logger_test.go on lines 48..53
    logger_test.go on lines 55..60
    logger_test.go on lines 62..67
    logger_test.go on lines 76..81

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    func (s *LoggerTestSuite) TestError() {
    s.logger.Error("Error")
    s.logger.Errorf("%s", "rorrE")
    assert.Contains(s.T(), s.logs.String(), "Error")
    assert.Contains(s.T(), s.logs.String(), "rorrE")
    Severity: Major
    Found in logger_test.go and 4 other locations - About 40 mins to fix
    logger_test.go on lines 48..53
    logger_test.go on lines 55..60
    logger_test.go on lines 62..67
    logger_test.go on lines 69..74

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    func (s *LoggerTestSuite) TestDebug() {
    s.logger.Debug("Debug")
    s.logger.Debugf("%s", "gubeD")
    assert.Contains(s.T(), s.logs.String(), "Debug")
    assert.Contains(s.T(), s.logs.String(), "gubeD")
    Severity: Major
    Found in logger_test.go and 4 other locations - About 40 mins to fix
    logger_test.go on lines 48..53
    logger_test.go on lines 62..67
    logger_test.go on lines 69..74
    logger_test.go on lines 76..81

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    func (s *LoggerTestSuite) TestInfo() {
    s.logger.Info("Info")
    s.logger.Infof("%s", "ofnI")
    assert.Contains(s.T(), s.logs.String(), "Info")
    assert.Contains(s.T(), s.logs.String(), "ofnI")
    Severity: Major
    Found in logger_test.go and 4 other locations - About 40 mins to fix
    logger_test.go on lines 48..53
    logger_test.go on lines 55..60
    logger_test.go on lines 69..74
    logger_test.go on lines 76..81

    Similar blocks of code found in 5 locations. Consider refactoring.
    Open

    func (s *LoggerTestSuite) TestTrace() {
    s.logger.Trace("Trace")
    s.logger.Tracef("%s", "ecarT")
    assert.Contains(s.T(), s.logs.String(), "Trace")
    assert.Contains(s.T(), s.logs.String(), "ecarT")
    Severity: Major
    Found in logger_test.go and 4 other locations - About 40 mins to fix
    logger_test.go on lines 55..60
    logger_test.go on lines 62..67
    logger_test.go on lines 69..74
    logger_test.go on lines 76..81

    Method Command.IsValid has 5 return statements (exceeds 4 allowed).
    Open

    func (command *Command) IsValid() error {
    application := command.config.Application
    if len(application) == 0 {
    return errors.New("no application was specified")
    }
    Severity: Major
    Found in command.go - About 35 mins to fix

      Method FileInitialiser.Handle has 5 return statements (exceeds 4 allowed).
      Open

      func (fi FileInitialiser) Handle(skip ...bool) error {
      if len(skip) > 0 && skip[0] {
      fi.logger.Info(
      Color("gray",
      fmt.Sprintf("godev> skipping '%s' - already exists", path.Base(fi.Path)),
      Severity: Major
      Found in initialiser.file.go - About 35 mins to fix

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        func (s *UtilsTestSuite) Test_confirm_withWeirdReplyNoRetry() {
        assert.False(s.T(), confirm(bufio.NewReader(strings.NewReader("something\n")), "hi", true))
        assert.False(s.T(), confirm(bufio.NewReader(strings.NewReader("something\n")), "hi", true))
        }
        Severity: Major
        Found in utils_test.go and 3 other locations - About 30 mins to fix
        utils_test.go on lines 47..50
        utils_test.go on lines 52..55
        utils_test.go on lines 67..70

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        func (s *UtilsTestSuite) Test_confirm_withoutReply() {
        assert.True(s.T(), confirm(bufio.NewReader(strings.NewReader("\n")), "hi", true))
        assert.False(s.T(), confirm(bufio.NewReader(strings.NewReader("\n")), "hi", false))
        }
        Severity: Major
        Found in utils_test.go and 3 other locations - About 30 mins to fix
        utils_test.go on lines 47..50
        utils_test.go on lines 52..55
        utils_test.go on lines 57..60

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        func (s *UtilsTestSuite) Test_confirm_withReply() {
        assert.True(s.T(), confirm(bufio.NewReader(strings.NewReader("y\n")), "hi", true))
        assert.False(s.T(), confirm(bufio.NewReader(strings.NewReader("n\n")), "hi", true))
        }
        Severity: Major
        Found in utils_test.go and 3 other locations - About 30 mins to fix
        utils_test.go on lines 52..55
        utils_test.go on lines 57..60
        utils_test.go on lines 67..70

        Similar blocks of code found in 4 locations. Consider refactoring.
        Open

        func (s *UtilsTestSuite) Test_confirm_withWindowsReply() {
        assert.True(s.T(), confirm(bufio.NewReader(strings.NewReader("y\r\n")), "hi", true))
        assert.False(s.T(), confirm(bufio.NewReader(strings.NewReader("n\r\n")), "hi", true))
        }
        Severity: Major
        Found in utils_test.go and 3 other locations - About 30 mins to fix
        utils_test.go on lines 47..50
        utils_test.go on lines 57..60
        utils_test.go on lines 67..70

        Your code does not pass gofmt in 1 place. Go fmt your code!
        Open

        // > data.go
        Severity: Minor
        Found in data.go by gofmt

        2: cannot find package "github.com/urfave/cli" in any of:
        Open

        "github.com/urfave/cli"
        Severity: Minor
        Found in cli.go by govet
        Severity
        Category
        Status
        Source
        Language