Showing 30 of 59 total issues
Function greet
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Conversation.prototype.greet = function() {
var words = {
botActions : [
'like', 'love', 'appreciate'
],
Function postVoteStarted
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
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); }
Function ServiceStats
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function ServiceStats(app) {
var app = express();
app.enable('trust proxy');
var port = 3001;
sockets.lookup['stats'] = port;
Function mergePR
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Voting.prototype.mergePR = function mergePR(pr, cb) {
var self = this;
gh.pullRequests.get({
user: self.repo.user,
Function closePR
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Voting.prototype.closePR = function closePR(message, pr, cb) {
var self = this;
// message is optional
if (typeof pr === 'function') {
Function instrument
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function instrument(strings, words, person) {
var regex = /\{\{(.*?)\}\}/;
var res;
var string = rd(strings);
while((res = regex.exec(string)) !== null) {
Consider simplifying this complex logical expression. Open
Open
if(word === this.nick + '!' || (
word.indexOf(this.nick) !== -1 && (
word.indexOf('wake up') !== -1 ||
word.indexOf('wakeup') !== -1 ||
word.indexOf('unmute') !== -1 ||
Avoid deeply nested control flow statements. Open
Open
if(res.length >= 2) {
self.sleepFor(parseFloat(res)*60*60);
}
else {
self.didntUnderstand();
Function getAllPages
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
gh.getAllPages = function getAllPages(repo, f, cb, n, results) {
Avoid too many return
statements within this function. Open
Open
return this.voteNegative;