Showing 212 of 557 total issues
File resol-deltasol-cs2-200-data.js
has 2881 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
var rawConfiguration = {
"languages": [
{
File resol-deltasol-cs4-200-data.js
has 2881 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
var rawConfiguration = {
"languages": [
{
File resol-deltasol-cs-plus-110-data.js
has 2648 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
var rawConfiguration = {
"languages": [
{
File resol-deltasol-bs4v2-103-data.js
has 2596 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
var rawConfiguration = {
"languages": [
{
File specification.js
has 1215 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const crypto = require('crypto');
File resol-deltasol-c-104-data.js
has 1112 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
var rawConfiguration = {
"languages": [
{
Function receive
has a Cognitive Complexity of 111 (exceeds 5 allowed). Consider refactoring. Open
receive(timestamp, chunk) {
const _this = this;
if (this.listenerCount('rawData') > 0) {
this.emit('rawData', chunk, timestamp);
- 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 connection.js
has 622 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const { Duplex } = require('stream');
File index.js
has 600 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const fs = require('fs');
const os = require('os');
const path = require('path');
Function _onConnection
has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring. Open
_onConnection(socket) {
const _this = this;
const connectionInfo = {
socket,
- 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 _connect
has 235 lines of code (exceeds 25 allowed). Consider refactoring. Open
_connect(force) {
const _this = this;
let socket;
Function transceiveValue
has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring. Open
async transceiveValue(valueInfo, value, options, state) {
if (!isObject(valueInfo)) {
valueInfo = {
valueIndex: valueInfo,
};
- 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 specification-file.js
has 540 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2016-present, Daniel Wippermann | MIT license */
const fs = require('fs');
const path = require('path');
File index.js
has 490 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const fs = require('fs');
const os = require('os');
const path = require('path');
Function completeConfiguration
has a Cognitive Complexity of 49 (exceeds 5 allowed). Consider refactoring. Open
async completeConfiguration(...configs) {
const _this = this;
const adjustableValues = _this._getAdjustableValues();
- 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 configuration-xml-deserializer.js
has 469 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const _ = require('lodash');
Function _parseBuffer
has 180 lines of code (exceeds 25 allowed). Consider refactoring. Open
_parseBuffer(buffer) {
const that = this;
const sliceBlock = function(name, offset, size) {
if ((offset < 0) || (offset > buffer.length)) {
File vbus-recording-converter.js
has 458 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const moreints = require('buffer-more-ints');
Function _getAdjustableValues
has a Cognitive Complexity of 45 (exceeds 5 allowed). Consider refactoring. Open
_getAdjustableValues() {
const data = this.constructor.configurationData;
const typeById = (data.types || []).reduce((memo, type) => {
memo [type.id] = type;
- 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 base-configuration-optimizer.js
has 434 lines of code (exceeds 250 allowed). Consider refactoring. Open
/*! resol-vbus | Copyright (c) 2013-present, Daniel Wippermann | MIT license */
const ConfigurationOptimizer = require('./configuration-optimizer');
const {
isNumber,