botwillacceptanything/botwillacceptanything

View on GitHub

Showing 59 of 59 total issues

File media.js has 802 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function () {
  'use strict';

  var weekdayPL = [
    [
Severity: Major
Found in lib/media.js - About 1 day to fix

    File conversation.js has 685 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    (function() {
      'use strict';
    
        if(!String.prototype.endsWith) {
            String.prototype.endsWith = function(searchString, position) {
    Severity: Major
    Found in lib/conversation.js - About 1 day to fix

      Function react has 123 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          Conversation.prototype.react = function(word) {
              if(this.muted) {
                  word = word.toLowerCase();
                  if(word === this.nick + '!' || (
                      word.indexOf(this.nick) !== -1 && (
      Severity: Major
      Found in lib/conversation.js - About 4 hrs to fix

        Function exports has 123 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                module.exports = function () {
                    var VOTING_UNDERWAY = 'Voting Underway',
                        VOTING_REJECTED = 'Rejected',
                        VOTING_MERGED = 'Merged',
                        voteStatusLabels = [
        Severity: Major
        Found in lib/integrations/github_labels.js - About 4 hrs to fix

          Function exports has 119 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  module.exports = function () {
                      var conversations = {};
                      var muted = false;
                      if(!config.irc) {
                          console.error('No IRC settings in config. IRC bot disabled.');
          Severity: Major
          Found in lib/integrations/irc.js - About 4 hrs to fix

            Function positiveReaction has 98 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                Conversation.prototype.positiveReaction = function(string) {
                var sentences;
                    var words = {
                        description : [
                            'cool',                'great',        'marvelous',
            Severity: Major
            Found in lib/conversation.js - About 3 hrs to fix

              Function negativeReaction has 94 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  Conversation.prototype.negativeReaction = function(string) {
                  var sentences;
                      var words = {
                          jabbering : [
                              'jabbering',         'spiel',        'stories',
              Severity: Major
              Found in lib/conversation.js - About 3 hrs to fix

                File voting.js has 306 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                (function() {
                    var define = require('amdefine')(module);
                
                    var deps = [
                        'lodash',
                Severity: Minor
                Found in lib/voting/voting.js - About 3 hrs to fix

                  Function hornyReaction has 59 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      Conversation.prototype.hornyReaction = function(word) {
                          if(isNo(word)) {
                              this.horny = false;
                              this.postGreet(word);
                              this.emit('say', 'okay :(');
                  Severity: Major
                  Found in lib/conversation.js - About 2 hrs to fix

                    Function exports has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        module.exports = function (votingConfig) {
                          var templates = {
                            votePassComment: template.render('voting/votePassComment.md'),
                            voteFailComment: template.render('voting/voteFailComment.md'),
                            modifiedWarning: template.render('voting/modifiedWarning.md'),
                    Severity: Major
                    Found in lib/voting/templates.js - About 2 hrs to fix

                      Function tallyVotes has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          VoteController.prototype.tallyVotes = function tallyVotes(pr) {
                            var self = this;
                      
                            var tally = pr.comments.reduce(function (result, comment) {
                              var user = comment.user.login,
                      Severity: Major
                      Found in lib/voting/votes.js - About 2 hrs to fix

                        Function RouteVideo has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                function RouteVideo(app) {
                                    /**
                                     * Display a message if the webhooks are operational.
                                     */
                                    app.get('/video', function (req, res) {
                        Severity: Major
                        Found in lib/routes/video.js - About 2 hrs to fix

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

                                          for (var i in files) {
                                              var file = files[i];
                          
                                              if(file == 'index.js') {
                                                  continue;
                          Severity: Major
                          Found in lib/services/index.js and 1 other location - About 2 hrs to fix
                          lib/routes/index.js on lines 27..38

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 76.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

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

                                          for (var i in files) {
                                              var file = files[i];
                          
                                              if(file == 'index.js') {
                                                  continue;
                          Severity: Major
                          Found in lib/routes/index.js and 1 other location - About 2 hrs to fix
                          lib/services/index.js on lines 28..39

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 76.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

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

                                      } else if (score < -1) {
                                        // Ugh, this PR sucks, boooo!
                                        gh.issues.createComment({
                                          user: self.repo.user,
                                          repo: self.repo.repo,
                          Severity: Major
                          Found in lib/voting/voting.js and 1 other location - About 1 hr to fix
                          lib/voting/voting.js on lines 261..277

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

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

                                      if (score > 1) {
                                        // I like this PR, let's vote for it!
                                        gh.issues.createComment({
                                          user: self.repo.user,
                                          repo: self.repo.repo,
                          Severity: Major
                          Found in lib/voting/voting.js and 1 other location - About 1 hr to fix
                          lib/voting/voting.js on lines 269..277

                          Duplicated Code

                          Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                          Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                          When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                          Tuning

                          This issue has a mass of 70.

                          We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                          The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                          If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                          See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                          Refactorings

                          Further Reading

                          Function ServiceHello has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

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

                            Function exports has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              module.exports = function(config, gh) {
                                
                                var eliza = new ElizaBot();
                                
                                  // returns all results of a paginated function
                            Severity: Minor
                            Found in lib/talk.js - About 1 hr to fix

                              Function makePlaylist has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                var makePlaylist = function (plSource) {
                                  var items = [];
                                  var grandTotalSeconds = 0;
                                  // compute total seconds and ETL
                                  var i;
                              Severity: Minor
                              Found in lib/media.js - About 1 hr to fix

                                Function exports has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        module.exports = function () {
                                            // If twitter is not enabled, return immediately.
                                            if (config.features.twitter !== true) {
                                              return {
                                                destroy: function () {},
                                Severity: Minor
                                Found in lib/integrations/twitter.js - About 1 hr to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language