Showing 12 of 14 total issues
File search_index.js
has 2300 lines of code (exceeds 600 allowed). Consider refactoring. Open
window.esdocSearchIndex = [
[
"recink/src/component/abstract-component.js~abstractcomponent",
"class/src/component/abstract-component.js~AbstractComponent.html",
"<span>AbstractComponent</span> <span class=\"search-result-import-path\">recink/src/component/abstract-component.js</span>",
Function report
has a Cognitive Complexity of 57 (exceeds 10 allowed). Consider refactoring. Open
report(result, options, _info = true) {
const blueUnderline = this.colors ? this.logger.chalk.blue.underline : (t => t);
const gray = this.colors ? this.logger.chalk.gray : (t => t);
const grayBold = this.colors ? this.logger.chalk.gray.bold : (t => t);
const red = this.colors ? this.logger.chalk.red : (t => t);
- 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
TerraformComponent
has 39 functions (exceeds 20 allowed). Consider refactoring. Open
class TerraformComponent extends DependencyBasedComponent {
/**
* @param {*} args
*/
constructor(...args) {
Terraform
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class Terraform {
/**
* @param {String} binary
* @param {String} resource
* @param {Object} vars
Function exports
has 161 lines of code (exceeds 100 allowed). Consider refactoring. Open
module.exports = (args, options, logger) => {
const recink = new Recink();
let cfg = {};
let namespace = args.name;
Function exports
has a Cognitive Complexity of 15 (exceeds 10 allowed). Consider refactoring. Open
module.exports = (args, options, logger) => {
const recink = new Recink();
let cfg = {};
let namespace = args.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 exports
has 102 lines of code (exceeds 100 allowed). Consider refactoring. Open
module.exports = (args, options, logger) => {
const githubUsername = options.githubUsername;
const githubPassword = options.githubPassword;
const githubToken = options.githubToken;
Function report
has 101 lines of code (exceeds 100 allowed). Consider refactoring. Open
report(result, options, _info = true) {
const blueUnderline = this.colors ? this.logger.chalk.blue.underline : (t => t);
const gray = this.colors ? this.logger.chalk.gray : (t => t);
const grayBold = this.colors ? this.logger.chalk.gray.bold : (t => t);
const red = this.colors ? this.logger.chalk.red : (t => t);
Avoid deeply nested control flow statements. Open
if (link) location.href = link.href;
Avoid deeply nested control flow statements. Open
if (innerButton && innerButton.classList.contains('opened')) {
innerButton.classList.remove('opened');
innerButton.classList.add('closed');
}
Avoid too many return
statements within this function. Open
return multiReporter.report(result, options)
.then(() => this._handleFail(result));
Function _createReport
has a Cognitive Complexity of 11 (exceeds 10 allowed). Consider refactoring. Open
_createReport(npmModule, emitModule, result, options) {
if (result && typeof result === 'object' && result instanceof Error) {
if (/package\.json\sis\snot\sa\snode\sproject/i.test(result.message)) {
this.logger.info(
this.logger.emoji.cross,
- 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"