Showing 1,401 of 1,401 total issues
Function collectBlocks
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
static async collectBlocks(options: {
run: Process.ProcessorRunner;
network: Pick<Input<"networks">, "name" | "networkId">;
blocks: (DataModel.Block | undefined)[];
settings?: {
- 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 detectErrors
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function detectErrors({
compilerOutput,
options,
solcVersion
}: {
- 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 minimumUpdatedTimePerSource
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function minimumUpdatedTimePerSource(
sourceFilesArtifacts: SourceFilesArtifacts
) {
let sourceFilesArtifactsUpdatedTimes: SourceFilesArtifactsUpdatedTimes = {};
// Get the minimum updated time for all of a source file's artifacts
- 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 decodeParameters
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
decodeParameters: (web3: Web3Shim) => {
const _oldDecodeParameters = web3.eth.abi.decodeParameters;
const ethersAbiCoder = new EthersAbi((type, value) => {
if (
- 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 checkDir
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
checkDir: async (options: unboxOptions = {}, destination: string) => {
let logger = options.logger || console;
if (!options.force) {
const unboxDir = fse.readdirSync(destination);
if (unboxDir.length) {
- 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 requiredSources
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async requiredSources(options: any) {
expect.options(options, [
"paths",
"base_path",
"resolver",
- 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 sendAndAwait
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const sendAndAwait = (socket: WebSocket, message: Message) => {
return new Promise<any>((resolve, reject) => {
socket.addEventListener("message", (event: WebSocket.MessageEvent) => {
if (typeof event.data !== "string") {
event.data = event.data.toString();
- 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 orderABI
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function orderABI({ abi, contractName, ast }) {
if (!abi) {
return []; //Yul doesn't return ABIs, but we require something
}
- 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 compileYulPaths
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async function compileYulPaths(yulPaths: string[], options: Config) {
let yulCompilations: Compilation[] = [];
for (const path of yulPaths) {
const yulOptions = options.with({ compilationTargets: [path] });
//load up Yul sources, since they weren't loaded up earlier
- 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 constructor
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
constructor({ events, solcConfig }) {
const { version, docker, compilerRoots, dockerTagsUrl, spawn } = solcConfig;
this.version = version ? version : defaultSolcVersion;
this.docker = docker;
this.strategyOptions = {};
- 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 verifyVCSURL
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async function verifyVCSURL(url: string) {
// Next let's see if the expected repository exists. If it doesn't, ghdownload
// will fail spectacularly in a way we can't catch, so we have to do it ourselves.
const configURL = parseURL(
`${vcsurl(url)
- 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 run
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const run = async <
C extends Collections,
Args extends unknown[],
Return,
R extends RequestType<C> | undefined
- 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 cleanup
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
cleanup() {
for (const eventName in this.listeners) {
const marked = this.listeners[eventName];
for (const listener of process.listeners(eventName as NodeJS.Signals)) {
if (!marked.has(listener)) {
- 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 sourcesWithDependencies
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
async sourcesWithDependencies({
paths,
options
}: SourcesWithDependenciesArgs) {
if (options.compilers.solc.version === "pragma") {
- 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 decodeConstant
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function* decodeConstant(
dataType: Format.Types.Type,
pointer: Pointer.ConstantDefinitionPointer,
info: Evm.EvmInfo
): Generator<DecoderRequest, Format.Values.Result, Uint8Array | 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 equalData
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function equalData(
bytes1: Uint8Array | undefined,
bytes2: Uint8Array | undefined
): boolean {
if (!bytes1 || !bytes2) {
- 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 one
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export function one<O extends {}, K extends string>(
options: O,
expectedKeys: K[]
): asserts options is HasOne<O, K> {
const found = expectedKeys.some(key => {
- 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 useStyles
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const useStyles = createStyles((theme, _params, _getRef) => ({
maxHeight: {
height: "100%"
},
sourceContent: {
- 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 DecodeTransactionResult
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export const DecodeTransactionResult = ({
decoder,
transaction,
receipt
}: Props) => {
- 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 Sources
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
function Sources({
sources,
session,
sessionUpdated,
unknownAddresses,
- 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"