Showing 722 of 1,271 total issues
Avoid too many return
statements within this function. Open
return state.set('isLoading', false);
Avoid too many return
statements within this function. Open
return state.set('isRendering', !state.isRendering);
Avoid too many return
statements within this function. Open
return state.set('searchQuery', '').set('isSearchingHosts', false);
Avoid too many return
statements within this function. Open
return state.set('value', payload);
Avoid too many return
statements within this function. Open
return param.value;
Avoid too many return
statements within this function. Open
return state.merge(payload);
Avoid too many return
statements within this function. Open
return state.set('isMaximized', !state.isMaximized);
Avoid too many return
statements within this function. Open
return state.merge(payload);
Avoid too many return
statements within this function. Open
return state.set('hosts', payload);
Avoid too many return
statements within this function. Open
return state
.set('isSelectOpen', !state.isSelectOpen)
.set('searchQuery', '');
Avoid too many return
statements within this function. Open
return state.set('diffViewType', payload);
Avoid too many return
statements within this function. Open
return state.set('isMasked', !state.isMasked);
Avoid too many return
statements within this method. Open
return 'Setting' if klass <= Setting
Avoid too many return
statements within this method. Open
return 'AuthSource' if klass <= AuthSource
Avoid too many return
statements within this method. Open
(handle_realm || return) if kind == 'provision'
Avoid too many return
statements within this method. Open
return head(:method_not_allowed) unless allowed_to_install?
Function getChartConfig
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const getChartConfig = ({
type,
data,
config,
onclick,
- 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 ReportsTable
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const ReportsTable = ({ reports, status, fetchReports, error, origin }) => {
const columns = getColumns(fetchReports, origin);
let tableBody = null;
let tableHead = null;
let emptyState = null;
- 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 submit_with_all_params
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function submit_with_all_params() {
$('form.hostresource-form input[type="submit"]').attr('disabled', true);
stop_pooling = false;
$('body').css('cursor', 'progress');
clear_errors();
- 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 HostsIndex
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const HostsIndex = () => {
const [menuOpen, setMenuOpen] = useState(false);
const [allColumns, setAllColumns] = useState(
getColumnData({ tableName: 'hosts' })
);
- 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"