Showing 8 of 8 total issues
Function generateDocumentation
has 130 lines of code (exceeds 25 allowed). Consider refactoring. Open
function generateDocumentation(
fileNames: string[],
options: ts.CompilerOptions
): void {
let fullFileNames = fileNames.map(
Function generateDocumentation
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
function generateDocumentation(
fileNames: string[],
options: ts.CompilerOptions
): void {
let fullFileNames = fileNames.map(
- 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 buildNode
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildNode(name, state) {
const result = state.searchResults.find(res => res.name === name);
const width = 500;
const height = 200;
if (result) {
Function Search
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Search(render, state, data) {
return h("div", [
h("input#search", {
hook: {
insert: init(data, state, render),
Function buildGraph
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
function buildGraph(graphData) {
const vGraph = graphData.processes.reduce(
(obj, proc) => {
obj.nodes[proc.name] = proc.component;
const edges = Object.keys(proc.inputs || {})
Function layout
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
function layout(graphData) {
const g = new dagre.graphlib.Graph();
g.setGraph({
rankdir: "LR",
// align: "TB",
Function CallExpression
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
CallExpression(node, state) {
// console.log(node.callee.name, node.arguments)
const _process = {
component: node.callee.name,
name: `_${node.callee.name}0`
- 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 VariableDeclarator
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
VariableDeclarator(node, state, cont) {
if (t.isCallExpression(node.init)) {
const _process = {
component: node.init.callee.name,
name: node.id.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"