Showing 685 of 1,401 total issues
Function resolvePossibleRelations
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function resolvePossibleRelations(
relationship: "ancestor" | "descendant"
) {
const { queryName, heightFilter, heightOrder } = relationshipProperties(
relationship
Function collectAllocationInfo
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function collectAllocationInfo(
compilations: Compilations.Compilation[]
): ContextAndAllocationInfo {
let contexts: Contexts.Contexts = {};
let deployedContexts: Contexts.Contexts = {};
Function _deploy
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
async _deploy(
options: Config,
context: MigrationContext,
deployer: DeployerInterface,
resolver: ResolverIntercept,
Function spinners
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
const spinners = Object.entries(statusByAddress).map(([address, status]) => {
switch (status) {
case "querying":
return (
<Box key={`address-${address}`}>
Function spinners
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
const spinners = Object.entries(statusByAddress).map(([address, status]) => {
switch (status) {
case "querying":
return (
<Box key={`address-${address}`}>
Function decodeMappingKeyCore
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
function* decodeMappingKeyCore(indexDefinition, keyDefinition) {
const scopes = yield select(data.current.scopes.inlined);
const compilationId = yield select(data.current.compilationId);
const internalFor = yield select(data.current.internalSourceFor); //should be null, but...
const currentAssignments = yield select(data.proc.assignments);
- 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 processTarget
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
async function processTarget(target, cwd, logger) {
const usesPath = target.path != undefined;
const usesCommand = target.command != undefined;
const usesStdin = target.stdin || target.stdin == undefined; // default true
const usesProperties = target.properties || target.fileProperties;
- 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 interpret
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
async interpret(input, context, filename, callback) {
const processedInput = processInput(input);
if (validTruffleConsoleCommands.includes(processedInput.split(/\s+/)[0])) {
try {
parseQuotesAndEscapes(processedInput); //we're just doing this to see
- 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 resolveAllSources
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
export async function resolveAllSources({
resolve,
paths,
shouldIncludePath,
parseImports
- 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 decodeMappingKeyCore
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
function* decodeMappingKeyCore(indexDefinition, keyDefinition) {
const scopes = yield select(data.current.scopes.inlined);
const compilationId = yield select(data.current.compilationId);
const internalFor = yield select(data.current.internalSourceFor); //should be null, but...
const currentAssignments = yield select(data.proc.assignments);
Function getFunctionsByProgramCounter
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
getFunctionsByProgramCounter: function (
instructions,
asts,
overlapFunctions,
compilationId
File index.js
has 301 lines of code (exceeds 250 allowed). Consider refactoring. Open
import debugModule from "debug";
const debug = debugModule("debugger:txlog:sagas");
import { put, takeEvery, select } from "redux-saga/effects";
import { prefixName } from "lib/helpers";
Function formatStacktrace
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
formatStacktrace: function (stacktrace, indent = 2) {
//get message or panic code from stacktrace
const { message, panic, custom } = stacktrace[0];
//we want to print inner to outer, so first, let's
//reverse
Function printRevertMessage
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
async printRevertMessage() {
this.config.logger.log(
DebugUtils.truffleColors.red("Transaction halted with a RUNTIME ERROR.")
);
this.config.logger.log("");
Function decodeLiteral
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* decodeLiteral(
dataType: Format.Types.Type,
pointer: Pointer.StackLiteralPointer,
info: Evm.EvmInfo
): Generator<DecoderRequest, Format.Values.Result, Uint8Array | null> {
File command-utils.js
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
const { bundled, core } = require("../lib/version").info();
const OS = require("os");
const analytics = require("../lib/services/analytics");
const { extractFlags } = require("./utils/utils"); // contains utility methods
const globalCommandOptions = require("./global-command-options");
Function parse
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const parse = function (args) {
if (args.length === 0) {
return null;
}
Function isUsableCompilation
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
isUsableCompilation: function (compilation) {
//check #1: is the source order reliable?
if (compilation.unreliableSourceOrder) {
debug("unreliable source order");
return 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 Debugger
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
function Debugger(): JSX.Element {
const { classes } = useStyles();
const [inputValue, setInputValue] = useInputState("");
const [sessionUpdated, { increment: sessionTick }] = useCounter();
const {
- 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 markTextHighlighted
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
export function markTextHighlighted(source: Source, sourceRange: SourceRange) {
const fullyHighlightedLines = new Set<number>();
const editedLines = source.contents.split("\n").map((line, index) => {
if (line.length === 0) {
return line;
- 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"