Fixed code smell 'Unexpected empty arrow function' reported by SonarQube.

This commit is contained in:
Akshay Joshi
2022-01-12 17:32:20 +05:30
parent d2457f2a1d
commit c98fb887cc
94 changed files with 1023 additions and 1023 deletions

View File

@@ -258,7 +258,7 @@ export default function DataGridView({
let colInfo = {
Header: <>&nbsp;</>,
id: 'btn-edit',
accessor: ()=>{},
accessor: ()=>{/*This is intentional (SonarQube)*/},
disableResizing: true,
sortable: false,
dataType: 'edit',
@@ -287,7 +287,7 @@ export default function DataGridView({
let colInfo = {
Header: <>&nbsp;</>,
id: 'btn-delete',
accessor: ()=>{},
accessor: ()=>{/*This is intentional (SonarQube)*/},
disableResizing: true,
sortable: false,
dataType: 'delete',
@@ -311,7 +311,7 @@ export default function DataGridView({
value: row.index,
});
}, ()=>{}, props.customDeleteTitle, props.customDeleteMsg);
}, ()=>{/*This is intentional (SonarQube)*/}, props.customDeleteTitle, props.customDeleteMsg);
}} className={classes.gridRowButton} disabled={!canDeleteRow} />
);
}

View File

@@ -439,7 +439,7 @@ export function InputSwitch({cid, helpid, value, onChange, readonly, controlProp
<Switch color="primary"
checked={Boolean(value)}
onChange={
readonly ? ()=>{} : onChange
readonly ? ()=>{/*This is intentional (SonarQube)*/} : onChange
}
id={cid}
inputProps={{
@@ -486,7 +486,7 @@ export function InputCheckbox({cid, helpid, value, onChange, controlProps, reado
<Checkbox
id={cid}
checked={Boolean(value)}
onChange={readonly ? ()=>{} : onChange}
onChange={readonly ? ()=>{/*This is intentional (SonarQube)*/} : onChange}
color="primary"
inputProps={{'aria-describedby': helpid}}
{...props}/>
@@ -1078,7 +1078,7 @@ FormFooterMessage.propTypes = {
message: PropTypes.string,
};
export function NotifierMessage({type=MESSAGE_TYPE.SUCCESS, message, closable=true, onClose=()=>{}}) {
export function NotifierMessage({type=MESSAGE_TYPE.SUCCESS, message, closable=true, onClose=()=>{/*This is intentional (SonarQube)*/}}) {
const classes = useStylesFormFooter();
return (

View File

@@ -140,7 +140,7 @@ function Wizard({ stepList, onStepChange, onSave, className, ...props }) {
if(props.beforeNext) {
props.beforeNext(activeStep).then(()=>{
setActiveStep((prevActiveStep) => prevActiveStep + 1);
}).catch(()=>{});
}).catch(()=>{/*This is intentional (SonarQube)*/});
} else {
setActiveStep((prevActiveStep) => prevActiveStep + 1);
}
@@ -151,7 +151,7 @@ function Wizard({ stepList, onStepChange, onSave, className, ...props }) {
if(props.beforeBack) {
props.beforeBack(activeStep).then(()=>{
setActiveStep((prevActiveStep) => prevActiveStep - 1 < 0 ? prevActiveStep : prevActiveStep - 1);
}).catch(()=>{});
}).catch(()=>{/*This is intentional (SonarQube)*/});
} else {
setActiveStep((prevActiveStep) => prevActiveStep - 1 < 0 ? prevActiveStep : prevActiveStep - 1);
}

View File

@@ -11,7 +11,7 @@ export default class HistoryCollection {
constructor(history_model) {
this.historyList = _.sortBy(history_model, o=>o.start_time);
this.onAdd(() => {});
this.onAdd(() => {/*This is intentional (SonarQube)*/});
}
length() {

View File

@@ -10,7 +10,7 @@ export default class QueryHistory {
this.histCollection = histModel;
this.editorPref = {};
this.onCopyToEditorHandler = ()=>{};
this.onCopyToEditorHandler = ()=>{/*This is intentional (SonarQube)*/};
this.histCollection.onAdd(this.onAddEntry.bind(this));
this.histCollection.onReset(this.onResetEntries.bind(this));
}

View File

@@ -11,7 +11,7 @@ export default class QueryHistoryDetails {
this.timeout = null;
this.isRendered = false;
this.sqlFontSize = null;
this.onCopyToEditorHandler = ()=>{};
this.onCopyToEditorHandler = ()=>{/*This is intentional (SonarQube)*/};
this.editorPref = {
'sql_font_size': '1em',