Showing 12 of 32 total issues
Function parse_status_block
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
var parsed = {
interface: block.match(/^([^\s^\:]+)/)[1]
- 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 parse_status_block
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
var parsed = {
interface: block.match(/^([^\s^\:]+)/)[1]
Function parse_status_block
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
var parsed = {};
if ((match = block.match(/bssid=([A-Fa-f0-9:]{17})/))) {
Function parse_status_block
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
var parsed = {};
if ((match = block.match(/bssid=([A-Fa-f0-9:]{17})/))) {
- 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 parse_cell
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_cell(cell) {
var parsed = { };
var match;
if ((match = cell.match(/Address\s*[:|=]\s*([A-Fa-f0-9:]{17})/))) {
Function parse_cell
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_cell(cell) {
var parsed = { };
var match;
if ((match = cell.match(/BSS ([0-9A-Fa-f:-]{17})\(on/))) {
Function parse_status_block
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
// Skip out of the block is invalid
if (!block) return;
Function parse_cell
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function parse_cell(cell) {
var parsed = { };
var match;
if ((match = cell.match(/BSS ([0-9A-Fa-f:-]{17})\(on/))) {
- 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 parse_cell
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
function parse_cell(cell) {
var parsed = { };
var match;
if ((match = cell.match(/Address\s*[:|=]\s*([A-Fa-f0-9:]{17})/))) {
- 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 parse_status_block
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
function parse_status_block(block) {
var match;
// Skip out of the block is invalid
if (!block) return;
- 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 parse_scan_results
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
function parse_scan_results(block) {
var match;
var results = [];
var lines;
Function set_network
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function set_network(interface, id, variable, value, callback) {