Showing 10 of 18 total issues
File kapit.js
has 401 lines of code (exceeds 250 allowed). Consider refactoring. Open
'use strict';
var _ = require('lodash');
var blessed = require('blessed');
Function response
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
exports.response = function(step) {
var output = '';
if(data.raw()) {
var outputStep = _.cloneDeep(step);
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function request
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.request = function(step) {
var output = '';
if (step.type === 'HTTP' && !data.raw()) {
output += '{green-fg}Name{/}: ' + step.name;
Function help
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.help = function() {
var output = '';
output += '{yellow-fg}Focused Element{/}';
output += '\n {green-fg}j{/} move down a line';
Function response
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.response = function(step) {
var output = '';
if(data.raw()) {
var outputStep = _.cloneDeep(step);
Function modal
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.modal = function(text, options) {
return blessed.box(_.merge({
padding: {
left: 1,
right: 1
Function request
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
exports.request = function(step) {
var output = '';
if (step.type === 'HTTP' && !data.raw()) {
output += '{green-fg}Name{/}: ' + step.name;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function input
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
exports.input = function(text, options) {
return blessed.Textbox(_.merge({
padding: {
left: 1,
right: 1
Function chain
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
exports.chain = function() {
return _(data.getCurrentSteps()).map(function(step, index) {
var color = '';
if(index === data.getCurrentChain().current) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function http
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
exports.http = function(request, label) {
var output = '';
if (request) {
output += '\n';
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"