Showing 51 of 158 total issues
Function render_addr_to
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
render_addr_to() {
if (this.transactionType === 'coinbase') {
return hexOrB32(this.coinbase.addr_to)
}
if (this.transactionType === 'transfer') {
- 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 getFullAddressState
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
const getFullAddressState = (request, callback) => {
try {
qrlApi('GetAddressState', request, (error, response) => {
if (error) {
const myError = errorCallback(error, 'Cannot access API/GetOptimizedAddressState', '**ERROR/getAddressState** ')
- 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 block
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
block(blockId) {
check(blockId, Number)
console.log(`block Method called for: ${blockId}`)
if (!(Match.test(blockId, Number)) || (Number.isNaN(blockId))) {
const errorCode = 400
- 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 color
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
color() {
let ret = ''
if (this.found) {
if (this.transaction.tx.transactionType === 'coinbase') {
ret = 'teal'
- 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 function. Open
return `${this.transfer_token.totalOutputs} addresses`
Avoid too many return
statements within this function. Open
return ''
Avoid too many return
statements within this function. Open
return ''
Function identifySearch
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const identifySearch = (str) => {
let adjstr = str.trim()
if (adjstr.charAt(0) === 'q') {
adjstr = `Q${adjstr.substr(1, adjstr.length - 1)}`
$('#mainSearch').val(adjstr)
- 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 click .themeToggle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
'click .themeToggle': () => {
try {
const x = LocalStore.get('theme')
if (x === 'dark') {
LocalStore.set('theme', 'light')
- 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 renderBlockBlock
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const renderBlockBlock = (blockId) => {
Meteor.call('block', blockId, (err, res) => {
// The method call sets the Session variable to the callback value
if (err) {
Session.set('block', {
- 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 click .themeToggle
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
'click .themeToggle': () => {
try {
const x = LocalStore.get('theme')
if (x === 'dark') {
LocalStore.set('theme', 'light')
- 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"