Showing 109 of 313 total issues
Function wrapAPIs
has 957 lines of code (exceeds 25 allowed). Consider refactoring. Open
const wrapAPIs = extensionAPIs => {
// NOTE: apiMetadata is associated to the content of the api-metadata.json file
// at build time by replacing the following "include" with the content of the
// JSON file.
const apiMetadata = {
File nn_calc.js
has 1464 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function (global, factory) {
typeof exports === "object" && typeof module !== "undefined" ? factory() :
typeof define === "function" && define.amd ? define(factory) :
(factory())
}(this, (function () {
File browser-polyfill.js
has 983 lines of code (exceeds 250 allowed). Consider refactoring. Open
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define("webextension-polyfill", ["module"], factory)
} else if (typeof exports !== "undefined") {
factory(module)
File simple_nn.js
has 583 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by alammar on 11/16/16.
*/
File shallow_nn_grapher.js
has 442 lines of code (exceeds 250 allowed). Consider refactoring. Open
/**
* Created by alammar on 12/8/16.
*/
var shallowNeuralNetworkGrapher = function (inputNodeCount, outputNodeCount, svgElement, analyticsCategory) {
File two_variable_nn.js
has 398 lines of code (exceeds 250 allowed). Consider refactoring. Open
var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
svg_el, table_el,
dataPoints, labels,
weights, bias,
gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
Function run
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
async run(context: SsgContext, inputPattern: string): Promise<void> {
const inputFiles = await glob(inputPattern)
const dictionary = new Dictionary(this.logger)
const dictWords = await dictionary.read(this.dictionaryFile)
this.logger.debug("Looking for files", inputPattern)
- 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 initializeNeuralNetworkGraph
has 121 lines of code (exceeds 25 allowed). Consider refactoring. Open
multiVariableNeuralNetworkTrainer.prototype.initializeNeuralNetworkGraph = function () {
this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // select the 'body' element
.append("svg") // append an SVG element to the body
.attr("width", this.graphWidth) // make the SVG element 449 pixels wide
.attr("height", 250); // make the SVG element 249 pixels high
Function createReplacer
has a Cognitive Complexity of 32 (exceeds 5 allowed). Consider refactoring. Open
protected async createReplacer(context: HtmlRR0SsgContext): Promise<DomReplacer<HTMLImageElement>> {
return {
replace: async (imgEl: HTMLImageElement): Promise<HTMLImageElement> => {
const src = imgEl.src
const imgParentEl = imgEl.parentElement
- 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 initializeGraph
has 113 lines of code (exceeds 25 allowed). Consider refactoring. Open
accuracyGraph.prototype.initializeGraph = function (containerElement, data) {
this.graphHolder = d3.select(this.containerElement) // select the 'body' element
.append("svg")
.attr("class", "accuracy-graph")
File build.ts
has 346 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
AngularExpressionReplaceCommand,
ClassDomReplaceCommand,
ContentStepConfig,
CopyStep,
Function drawGraph
has 90 lines of code (exceeds 25 allowed). Consider refactoring. Open
shallowNeuralNetworkGrapher.prototype.drawGraph = function () {
var grapher = this;
this.nodeRadius = 15;
this.weightNodeWidthRatio = 1.7;
// Let's calculate our coordinates for all the nodes
Function draw
has 89 lines of code (exceeds 25 allowed). Consider refactoring. Open
draw: function (layer, properties, activeRegionSVGGroup, layerInputs, tooltipDiv) {
console.log("layer", layer)
var data = layer.nodeRenderingDetails,
containerElement = properties.containerElement
Function portSearchChange
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
function portSearchChange (filter) {
tableBody.innerHTML = ""
const input = (portSearchInput.value || "").toLowerCase().trim()
/**
- 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 initializeGraph
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
sigmoidGraph.prototype.initializeGraph = function () {
var obj = this;
this.graphHolder = d3.select(this.containerElement) // select the container element
.append("svg") // append an SVG element to the body
.attr("class", "activation-graph")
Function initializeGraph
has 85 lines of code (exceeds 25 allowed). Consider refactoring. Open
reluGraph.prototype.initializeGraph = function () {
var obj = this
this.graphHolder = d3.select(this.containerElement) // select the 'body' element
.append("svg") // append an SVG element to the body
.attr("class", "activation-graph")
Function graphNode
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function graphNode(data) {
var grapher = this
// JOIN
var inputGroups = this.neuralNetworkG.selectAll(this.svgElement + " .output-group")
Function graphSoftmax
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
function graphSoftmax(data) {
var softmax = this.neuralNetworkG.selectAll(this.svgElement + " .softmax")
.data([data])
Function graphWeightNodes
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function graphWeightNodes(data) {
var radius = this.nodeRadius * this.weightNodeSizeScale
var grapher = this
var t = d3.transition()
.duration(750)
Function initializeNeuralNetworkGraph
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
NN_trainer.prototype.initializeNeuralNetworkGraph = function () {
this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // select the 'body' element
.append("svg") // append an SVG element to the body
.attr("width", this.graphWidth) // make the SVG element 449 pixels wide
.attr("height", 150); // make the SVG element 249 pixels high