Fixed following SonarQube code smells:

1) Remove this useless assignment to a variable.
2) Remove the unused local variable.
This commit is contained in:
Akshay Joshi
2022-01-12 14:53:19 +05:30
parent 374c5e952f
commit e38c38cd58
17 changed files with 30 additions and 42 deletions

View File

@@ -8,8 +8,7 @@
//////////////////////////////////////////////////////////////
import React, { useCallback, useEffect, useMemo, useReducer, useRef, useState } from 'react';
import { Box, makeStyles } from '@material-ui/core';
import {Accordion, AccordionSummary, AccordionDetails} from '@material-ui/core';
import { Box, makeStyles, Accordion, AccordionSummary, AccordionDetails} from '@material-ui/core';
import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
import SaveIcon from '@material-ui/icons/Save';
import PublishIcon from '@material-ui/icons/Publish';
@@ -323,14 +322,13 @@ const getDepChange = (currPath, newState, oldState, action)=>{
const getDeferredDepChange = (currPath, newState, oldState, action)=>{
if(action.deferredDepChange) {
let deferredPromiseList = action.deferredDepChange(currPath, newState, {
return action.deferredDepChange(currPath, newState, {
type: action.type,
path: action.path,
value: action.value,
depChange: action.depChange,
oldState: _.cloneDeep(oldState),
});
return deferredPromiseList;
}
};
@@ -821,7 +819,6 @@ function SchemaPropertiesView({
});
}, [getInitData]);
let fullTabs = [];
/* A simple loop to get all the controls for the fields */
schema.fields.forEach((field)=>{
@@ -831,10 +828,8 @@ function SchemaPropertiesView({
if(field.isFullTab) {
tabsClassname[group] = classes.noPadding;
fullTabs.push(group);
}
readonly = true;
if(modeSupported) {
group = groupLabels[group] || group || defaultTab;
if(field.helpMessageMode && field.helpMessageMode.indexOf(viewHelperProps.mode) == -1) {