botwillacceptanything/botwillacceptanything

View on GitHub

Showing 30 of 59 total issues

Function greet has 36 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    Conversation.prototype.greet = function() {
        var words = {
            botActions : [
                'like',             'love',         'appreciate'
            ],
Severity: Minor
Found in lib/conversation.js - About 1 hr to fix

    Function postVoteStarted has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

          Voting.prototype.postVoteStarted = function postVoteStarted(pr) {
            var self = this;
    
            this.getVoteStartedComment(pr, function (err, comment) {
              if (err) { return console.error('error in postVoteStarted:', err); }
    Severity: Minor
    Found in lib/voting/voting.js - About 1 hr to fix

      Function ServiceStats has 31 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              function ServiceStats(app) {
                  var app = express();
                  app.enable('trust proxy');
                  var port = 3001;
                  sockets.lookup['stats'] = port;
      Severity: Minor
      Found in lib/services/stats.js - About 1 hr to fix

        Function mergePR has 29 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

              Voting.prototype.mergePR = function mergePR(pr, cb) {
                var self = this;
        
                gh.pullRequests.get({
                  user: self.repo.user,
        Severity: Minor
        Found in lib/voting/voting.js - About 1 hr to fix

          Function closePR has 27 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                Voting.prototype.closePR = function closePR(message, pr, cb) {
                  var self = this;
          
                  // message is optional
                  if (typeof pr === 'function') {
          Severity: Minor
          Found in lib/voting/voting.js - About 1 hr to fix

            Function instrument has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                function instrument(strings, words, person) {
                    var regex = /\{\{(.*?)\}\}/;
                    var res;
                    var string = rd(strings);
                    while((res = regex.exec(string)) !== null) {
            Severity: Minor
            Found in lib/conversation.js - About 1 hr to fix

              Consider simplifying this complex logical expression.
              Open

                          if(word === this.nick + '!' || (
                              word.indexOf(this.nick) !== -1 && (
                                  word.indexOf('wake up') !== -1 ||
                                  word.indexOf('wakeup') !== -1 ||
                                  word.indexOf('unmute') !== -1 ||
              Severity: Major
              Found in lib/conversation.js - About 1 hr to fix

                Avoid deeply nested control flow statements.
                Open

                                if(res.length >= 2) {
                                    self.sleepFor(parseFloat(res)*60*60);
                                }
                                else {
                                    self.didntUnderstand();
                Severity: Major
                Found in lib/conversation.js - About 45 mins to fix

                  Function getAllPages has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                    gh.getAllPages = function getAllPages(repo, f, cb, n, results) {
                  Severity: Minor
                  Found in lib/github.js - About 35 mins to fix

                    Avoid too many return statements within this function.
                    Open

                          return this.voteNegative;
                    Severity: Major
                    Found in lib/voting/votes.js - About 30 mins to fix
                      Severity
                      Category
                      Status
                      Source
                      Language