Showing 754 of 2,690 total issues
Function updateFeatureProperty
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
updateFeatureProperty(state, listName, deviceIndex, featureIndex, property, value) {
Function UsagePointDevice
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const UsagePointDevice = ({
device,
language = 'fr',
deviceIndex,
updateDeviceParam,
- 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 render
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
render(
{ housesWithRooms = [], broadlinkPeripherals = [], ...props },
{ device, selectedFeature, selectedValue, editedFeatures = {}, learning, learnAllMode, peripheral, saveStatus }
) {
const canSave = Object.keys(editedFeatures).length === 0 || !device.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"
Further reading
Function getAllPropertiesObject
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const getAllPropertiesObject = (obj, path = '', results = []) => {
Object.keys(obj).forEach(key => {
const value = obj[key];
const shouldContinueParsingTree = typeof value === 'object' && value !== null && value !== undefined;
const keyIsNumber = isNumeric(key);
- 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 Profile
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const Profile = ({ children, ...props }) => {
return (
<div>
{props.unknownError && (
<div class="alert alert-danger" role="alert">
- 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 normalize
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function normalize(value, currentMin, currentMax, newRangeMin, newRangeMax) {
Function writeDevice
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async function writeDevice(peripheral, serviceUuid, characteristicUuid, value, withoutResponse = false) {
Function deviceFeatureWebsocketEvent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async deviceFeatureWebsocketEvent(state, box, x, y, payload) {
Function Camera
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const Camera = function Camera(stateManager, messageManager, eventManager, serviceManager, deviceManager) {
Function getIntegrations
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async getIntegrations(state, intl, category, searchKeyword = '', orderDir = 'asc') {
Function executeAction
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async function executeAction(self, action, scope, columnIndex, rowIndex) {
Function MessageHandler
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
const MessageHandler = function MessageHandler(event, brain, service, state, variable) {
Function deviceFeatureWebsocketEvent
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
async deviceFeatureWebsocketEvent(state, box, x, y, payload) {
Function editRoom
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
editRoom(state, houseIndex, roomIndex, property, value) {
Function mergeBoxData
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
mergeBoxData(state, key, x, y, data) {
Function updateDeviceField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
updateDeviceField(state, listName, index, field, value) {
Function updateFeatureProperty
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
updateFeatureProperty(state, deviceIndex, featureIndex, property, value) {
Function updateDeviceField
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
updateDeviceField(state, listName, index, field, value) {
Function updateLocalValue
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
updateLocalValue(state, roomIndex, deviceIndex, deviceFeatureIndex, value) {
Function updateBoxStatus
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
updateBoxStatus(state, key, x, y, status) {