Showing 20 of 62 total issues
Function Collector
has 116 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Collector = function () {
function Collector() {
_classCallCheck(this, Collector);
this._couchbase = new _couchbase2.default();
Function Couchbase
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Couchbase = function () {
function Couchbase() {
_classCallCheck(this, Couchbase);
this._client = null;
Function Worker
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Worker = function () {
function Worker() {
_classCallCheck(this, Worker);
this.processors = {};
Function App
has 44 lines of code (exceeds 25 allowed). Consider refactoring. Open
var App = function () {
function App() {
_classCallCheck(this, App);
}
Function Config
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
var Config = function () {
function Config() {
_classCallCheck(this, Config);
}
Function loadProcessors
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function loadProcessors() {
return new Promise(function (resolve, reject) {
var dir = _path2.default.join(__dirname, '..', '..', 'node_modules');
_fs2.default.readdir(dir, function (err, items) {
if (err) {
Function loadProcessors
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function loadProcessors() {
return new Promise((resolve, reject) => {
const dir = path.join(__dirname, '..', '..', 'node_modules');
fs.readdir(dir, (err, items) => {
if (err) {
Function requestSuperagent
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function requestSuperagent(url, retryNo = 0) {
return new Promise((resolve, reject) => {
let req = superagent
.get(url)
.timeout(config.timeout)
Function requestSuperagent
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function requestSuperagent(url) {
var retryNo = arguments.length <= 1 || arguments[1] === undefined ? 0 : arguments[1];
return new Promise(function (resolve, reject) {
var req = _superagentUse2.default.get(url).timeout(_config.config.timeout).retry(_config.config.retry.count).redirects(5);
Function crawl
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
crawl(args = process.argv) {
program
.version(pkg.version)
.parse(args);
Function crawl
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function crawl() {
var args = arguments.length <= 0 || arguments[0] === undefined ? process.argv : arguments[0];
_commander2.default.version(_package2.default.version).parse(args);
Function run
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
value: function run(channel) {
var _this3 = this;
channel.assertQueue(_config.config.amqp.queues.collector, {
durable: true
Function Config
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
var Config = function () {
function Config() {
_classCallCheck(this, Config);
}
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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 _createClass
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); // Copyright, 2013-2016, by Tomas Korcak. <korczis@gmail.com>
- 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"