Showing 1,088 of 2,665 total issues
File dashboard.js
has 7658 lines of code (exceeds 250 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
// DO NOT EDIT: This file is automatically generated from the source files in src/
// ----------------------------------------------------------------------------
File dashboard_info.js
has 7044 lines of code (exceeds 250 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
// Codacy declarations
/* global NETDATA */
Function chartState
has a Cognitive Complexity of 904 (exceeds 5 allowed). Consider refactoring. Open
let chartState = function (element) {
this.element = element;
// IMPORTANT:
// all private functions should use 'that', instead of 'this'
- 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
File charts.go
has 4582 lines of code (exceeds 500 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
package windows
import (
File main.js
has 4102 lines of code (exceeds 250 allowed). Consider refactoring. Open
// Main JavaScript file for the Netdata GUI.
// Codacy declarations
/* global NETDATA */
Function chartState
has 2125 lines of code (exceeds 25 allowed). Consider refactoring. Open
let chartState = function (element) {
this.element = element;
// IMPORTANT:
// all private functions should use 'that', instead of 'this'
Function chartState
has 2125 lines of code (exceeds 25 allowed). Consider refactoring. Open
let chartState = function (element) {
this.element = element;
// IMPORTANT:
// all private functions should use 'that', instead of 'this'
File main.js
has 3119 lines of code (exceeds 250 allowed). Consider refactoring. Open
// *** src/dashboard.js/main.js
// Codacy declarations
/* global clipboard */
File dictionary.go
has 2224 lines of code (exceeds 500 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
package api
import (
File d3pie-0.2.1-netdata-3.js
has 1606 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*!
* d3pie
* @author Ben Keen
* @version 0.1.9
* @date June 17th, 2015
Function dygraphChartCreate
has a Cognitive Complexity of 205 (exceeds 5 allowed). Consider refactoring. Open
NETDATA.dygraphChartCreate = function (state, data) {
if (NETDATA.options.debug.dygraph || state.debug) {
state.log('dygraphChartCreate()');
}
- 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
File imageutils.py
has 1385 lines of code (exceeds 250 allowed). Consider refactoring. Open
import os
from pathlib import Path
import dagger
Function alarmsUpdateModal
has 667 lines of code (exceeds 25 allowed). Consider refactoring. Open
function alarmsUpdateModal() {
var active = '<h3>Raised Alarms</h3><table class="table">';
var all = '<h3>All Running Alarms</h3><div class="panel-group" id="alarms_all_accordion" role="tablist" aria-multiselectable="true">';
var footer = '<hr/><a href="https://github.com/netdata/netdata/tree/master/src/web/api/badges#netdata-badges" target="_blank">netdata badges</a> refresh automatically. Their color indicates the state of the alarm: <span style="color: #e05d44"><b> red </b></span> is critical, <span style="color:#fe7d37"><b> orange </b></span> is warning, <span style="color: #4c1"><b> bright green </b></span> is ok, <span style="color: #9f9f9f"><b> light grey </b></span> is undefined (i.e. no data or no status), <span style="color: #000"><b> black </b></span> is not initialized. You can copy and paste their URLs to embed them in any web page.<br/>netdata can send notifications for these alarms. Check <a href="https://github.com/netdata/netdata/blob/master/src/health/notifications/health_alarm_notify.conf" target="_blank">this configuration file</a> for more information.';
Function dygraphChartCreate
has 556 lines of code (exceeds 25 allowed). Consider refactoring. Open
NETDATA.dygraphChartCreate = function (state, data) {
if (NETDATA.options.debug.dygraph || state.debug) {
state.log('dygraphChartCreate()');
}
Function dygraphChartCreate
has 550 lines of code (exceeds 25 allowed). Consider refactoring. Open
NETDATA.dygraphChartCreate = function (state, data) {
if (NETDATA.options.debug.dygraph || state.debug) {
state.log('dygraphChartCreate()');
}
File charts.go
has 1311 lines of code (exceeds 500 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
package postgres
import (
File charts.go
has 1207 lines of code (exceeds 500 allowed). Consider refactoring. Open
// SPDX-License-Identifier: GPL-3.0-or-later
package mysql
import (
File emitter.py
has 952 lines of code (exceeds 250 allowed). Consider refactoring. Open
# SPDX-License-Identifier: MIT
# Emitter expects events obeying the following grammar:
# stream ::= STREAM-START document* STREAM-END
# document ::= DOCUMENT-START node DOCUMENT-END
File scanner.py
has 882 lines of code (exceeds 250 allowed). Consider refactoring. Open
# SPDX-License-Identifier: MIT
# Scanner produces tokens of the following types:
# STREAM-START
# STREAM-END
Method Windows.collectMSSQL
has a Cognitive Complexity of 120 (exceeds 20 allowed). Consider refactoring. Open
func (w *Windows) collectMSSQL(mx map[string]int64, pms prometheus.Series) {
instances := make(map[string]bool)
dbs := make(map[string]bool)
px := "mssql_instance_"
for _, pm := range pms.FindByName(metricMSSQLAccessMethodPageSplits) {
- 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"