Showing 92 of 413 total issues
Function comparisonConfig
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
comparisonConfig() {
return {
Header: "Compare",
accessor: "comparison",
show: this.props.additionalData,
- 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 actualReducer
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
const actualReducer = (state, { type, payload }) => {
switch (type) {
case ADD_MACRO_CLUSTER:
return {
...state,
- 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
Method image
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def image
image =
document
.at_css('meta[property="og:image"]')
&.attribute("content")
- 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 CurrentlyInkedCard
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const CurrentlyInkedCard = (props) => {
const {
hiddenFields,
id,
comment,
- 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
Method params
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def params(row)
row.keys.each do |k|
row[k] = "" if row[k].nil?
row[k] = row[k].strip
end
- 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
Method run
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def run
remaining_tries = 5
suggestion = request_suggestion
loop do
- 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 ActualInkAddButton
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const ActualInkAddButton = ({ macro_cluster_id, inCollection, detailView }) => {
const [state, setState] = useState(null);
const [kind, setKind] = useState("bottle");
const add = () => {
setState("adding");
- 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
Avoid too many return
statements within this method. Open
return "herbin" if name =~ /herbin/i
Avoid too many return
statements within this method. Open
return "kobe" if name =~ /^nagasawa/i
Avoid too many return
statements within this method. Open
return "noodlers" if name =~ /^noodler/i
Avoid too many return
statements within this method. Open
return "robertoster" if name =~ /^robert\s*oster/i
Avoid too many return
statements within this method. Open
return "birminghampens" if name =~ /^birmingham/i
Avoid too many return
statements within this method. Open
return "kyototag" if name =~ /(^tag\s+)|(\s+tag$)|(^tag$)/i
Avoid too many return
statements within this method. Open
return "lecritoire" if simplified =~ /^lecritoire/
Avoid too many return
statements within this method. Open
return "maruzen" if name =~ /^maruzen/i
Avoid too many return
statements within this method. Open
return "pensalley" if simplified =~ /pensalley/
Avoid too many return
statements within this method. Open
return "lamy" if name =~ /^lamy/i
Avoid too many return
statements within this function. Open
return sortByElement(colorA, colorB, 2);
Avoid too many return
statements within this method. Open
return "banmi" if name =~ /^ban\s*mi/i
Avoid too many return
statements within this method. Open
return "organicsstudio" if simplified =~ /^organics?studios?$/