src/deep-kernel/lib/Kernel.js
Kernel
has 51 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class Kernel {
/**
* @param {Array} deepServices
* @param {String} context
*/
File Kernel.js
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Created by mgoria on 5/26/15.
*/
/*eslint no-proto: 0*/
Function _buildContainer
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_buildContainer(callback) {
this._env = this._config.env;
this._container.addParameter(
Kernel.KERNEL,
Function bootstrap
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bootstrap(callback) {
let rumEvent = {
service: 'deep-kernel',
resourceType: 'Lambda',
eventName: 'KernelLoad',
Function loadAsyncConfig
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
loadAsyncConfig(cb) {
if (this._asyncConfigCache) {
cb(this._asyncConfigCache);
return this;
Function microservice
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
Open
microservice(identifier = null) {
if (!identifier) {
identifier = this._config.microserviceIdentifier;
}
- 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"