Showing 685 of 1,401 total issues
Function setOrClearBreakpointObject
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
async setOrClearBreakpointObject(breakpoint, setOrClear) {
const existingBreakpoints = this.session.view(controller.breakpoints);
//OK, we've constructed the breakpoint! But if we're adding, we'll
//want to adjust to make sure we don't set it on an empty line or
//anything like that
Function merge
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
merge({ outputs, breadcrumb, output }) {
const { compilationIndex, sourcePointer } = breadcrumb;
const compilationsBefore = outputs.slice(0, compilationIndex);
const compilation = outputs[compilationIndex];
Function findPossibleNetworks
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
const findPossibleNetworks = async (options: {
network: Resource<"networks">;
limit: number;
alreadyTried: string[];
workspace: Workspace;
Function ConfirmChain
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function ConfirmChain(): JSX.Element {
const {
state: { chainInfo },
operations: { toggleNotice }
} = useDash()!;
Function Stack
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Stack(): JSX.Element | null {
const { classes } = useStyles();
const {
state: {
debugger: { session }
Function decodeLog
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* decodeLog() {
const userDefinedTypes = yield select(data.views.userDefinedTypes);
const state = yield select(data.current.state); //note: this includes the data to be decoded!
const allocations = yield select(data.info.allocations);
const contexts = yield select(data.views.contexts);
Function fromBuildInfo
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const fromBuildInfo = (
buildInfo: Hardhat.BuildInfo
): CompiledContract[] => {
const contracts = [];
for (const [sourcePath, sourceContracts] of Object.entries(
Function Layout
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
function Layout(): JSX.Element {
const {
state: { notice, analyticsConfig },
operations: { updateAnalyticsConfig }
} = useDash()!;
Function start
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
start: async function (context, web3Error) {
const constructor = this;
let currentBlock = override.defaultMaxBlocks;
// Reject after attempting to get reason string if we shouldn't be waiting.
- 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 processDeploymentError
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
async processDeploymentError(data) {
const error = data.estimateError || data.error;
data.reason = data.error ? data.error.reason : 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 exports
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
module.exports = fn => {
// Add our static methods
// Add something here about excluding send, privately defined methods
Object.keys(fn._constructorMethods).forEach(function (key) {
fn[key] = fn._constructorMethods[key].bind(fn);
- 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 printInstruction
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
printInstruction(locations = this.locationPrintouts) {
const instruction = this.session.view(sourcemapping.current.instruction);
const instructions = this.session.view(sourcemapping.current.instructions);
const step = this.session.view(trace.step);
const traceIndex = this.session.view(trace.index);
- 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 printVariables
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
async printVariables(sectionOuts = this.sectionPrintouts) {
const values = await this.session.variables();
const sections = this.session.view(data.current.identifiers.sections);
const sectionNames = {
- 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 flattedEvents
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
flattedEvents: createLeaf(["./transactionLog"], log => {
const returnStatus = node => {
switch (node.returnKind) {
case "revert":
return false;
Function scopes
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function scopes(state = DEFAULT_SCOPES, action) {
switch (action.type) {
case actions.SCOPE: {
const { sourceId, id, sourceIndex, parentId, pointer } = action;
const astRef = id !== undefined ? id : makePath(sourceIndex, pointer);
Function rejectHijacker
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
function rejectHijacker(e) {
debug("hijacking!");
debug("hash: %s", this.txHash);
let getSolidityStackTrace;
if (bugger && this.txHash) {
Function exports
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
module.exports = async function (options) {
const Config = require("@truffle/config");
const OS = require("os");
const log = options.logger
Function printState
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
printState(
contextBefore = 2,
contextAfter = 0,
location = this.session.view(controller.current.location)
) {
Function process
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function* process<
Network extends Pick<Resource<"networks">, "id" | keyof Input<"networks">>
>(options: { network: IdObject<"networks"> }): Process<Network | undefined> {
const {
network: { id }
Function createMultistepSelectors
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
function createMultistepSelectors(stepSelector) {
return {
/**
* .instruction
*/