Showing 5,781 of 10,536 total issues
Function generate_excel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report,
Function export
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(report, name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function generate_excel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function generate_excel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function export
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(result, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function export
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(result, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function generate_excel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function export
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def export(result, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function generate_excel
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def generate_excel(report, space_name, reporting_start_datetime_local, reporting_end_datetime_local, language):
Function write_log
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def write_log(user_uuid, request_method, resource_type, resource_id, request_body):
Function applyAttr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jvm.SVGShapeElement.prototype.applyAttr = function(attr, value){
var patternEl,
imageEl,
that = this;
- 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 DataSeries
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jvm.DataSeries = function(params, elements, map) {
var scaleConstructor;
params = params || {};
params.attribute = params.attribute || 'fill';
- 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 setSelected
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
setSelected: function(type, keys){
var i;
if (typeof keys != 'object') {
keys = [keys];
- 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 applyAttr
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
jvm.VMLShapeElement.prototype.applyAttr = function(attr, value){
switch (attr) {
case 'fill':
this.node.fillcolor = value;
break;
- 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 People
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const People = ({ peoples = rawPeople.length, className }) => {
const { loading, data: people, setData: setPeople } = useFakeFetch(rawPeople);
const searchPeople = ({ target }) => {
const keyword = target.value.toLowerCase();
- 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 useBulkSelect
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const useBulkSelect = items => {
const [selectedItems, setSelectedItems] = useState([]);
const [isAllSelected, setIsAllSelected] = useState(false);
const [isIndeterminate, setIsIndeterminate] = useState(false);
- 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 DistributionSystem
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const DistributionSystem = ({ setRedirect, setRedirectUrl, t }) => {
useEffect(() => {
let is_logged_in = getCookieValue('is_logged_in');
let user_name = getCookieValue('user_name');
let user_display_name = getCookieValue('user_display_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 Notification
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const Notification = ({ setRedirect, setRedirectUrl, t }) => {
let current_moment = moment();
const [startDatetime, setStartDatetime] = useState(current_moment.clone().subtract(1, 'months'));
const [endDatetime, setEndDatetime] = useState(current_moment);
const [status, setStatus] = useState('all');
- 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 CollectionDashboard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const CollectionDashboard = ({ setRedirect, setRedirectUrl, t }) => {
const [isDashboardFetched, setIsDashboardFetched] = useState(false);
const [isEnergyStoragePowerStationCollectionEnergyFetched, setIsEnergyStoragePowerStationCollectionEnergyFetched] = useState(false);
const [isEnergyStoragePowerStationCollectionBillingFetched, setIsEnergyStoragePowerStationCollectionBillingFetched] = useState(false);
const [isEnergyStoragePowerStationCollectionCarbonFetched, setIsEnergyStoragePowerStationCollectionCarbonFetched] = useState(false);
- 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 CartModal
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const CartModal = ({ type, id, quantity, title, files, price, sale, modal, setModal }) => {
const { currency } = useContext(AppContext);
if (!id) return null;
return (
<Modal isOpen={modal} toggle={() => setModal(!modal)} size="lg">
- 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"