Showing 685 of 1,401 total issues
Function validate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
validate: function (contractObj) {
var ajv = new Ajv({ verbose: true });
ajv.addSchema(abiSchema);
ajv.addSchema(networkObjectSchema);
ajv.addSchema(contractObjectSchema);
Function iterate
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
*iterate({ inputs }) {
for (const [compilationIndex, { sources, contracts }] of inputs.entries()) {
for (const [sourceIndex, source] of sources.entries()) {
yield {
input: source,
Function Middle
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function Middle(): JSX.Element {
const {
state: { providerMessages }
} = useDash()!;
const numRequests = providerMessages.size;
Function collectSources
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function collectSources(
originalSources: Sources,
originalTargets: string[] = [],
baseDirectory: string = "",
replacement: string = "/"
Function aboutToModify
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(node, invocation, index, next, nextInvocation, isContextChange) => {
//ensure: current instruction is not a context change (because if it is
//we cannot rely on the data.next selectors, but also if it is we know
//we're not about to call a modifier or base constructor!)
//we also want to return false if we can't find things for whatever
Function exports
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = async function (options) {
const OS = require("os");
const deprecationMessage = colors.yellow(
`> The watch command is planned ` +
`for deprecation in version 6 of Truffle.${OS.EOL}` +
Function listVersions
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const listVersions = async function (options) {
const { CompilerSupplier } = require("@truffle/compile-solidity");
const { asyncTake } = require("iter-tools");
const supplier = new CompilerSupplier({
Function fetchExternalSources
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async fetchExternalSources(bugger) {
const fetchSpinner = new Spinner(
"core:debug:cli:fetch",
"Getting and compiling external sources..."
);
Function request
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async request({
method,
params,
formatOutput
}: SendRequestArgs): Promise<any> {
Function interpretTryAggregate
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async interpretTryAggregate(
decoding: Codec.CalldataDecoding,
transaction: DecoderTypes.Transaction,
additionalContexts: Contexts.Contexts = {},
additionalAllocations?: {
Function getTruffleDashboardUserConfig
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function getTruffleDashboardUserConfig(
config: HardhatConfig,
userConfig: HardhatUserConfig
) {
const {
Function readAndParseArtifactFiles
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function readAndParseArtifactFiles(
paths: string[],
contracts_build_directory: string
): SourceFilesArtifacts {
const sourceFilesArtifacts: SourceFilesArtifacts = {};
Function requiredSources
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async requiredSources(options: any) {
expect.options(options, [
"paths",
"base_path",
"resolver",
Function fetchSourcesForAddressAndMatchType
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private async fetchSourcesForAddressAndMatchType(
address: string,
matchType: "full" | "partial"
): Promise<Types.SourceInfo | null> {
const metadata = await this.getMetadata(address, matchType);
Function instantExternalCall
has 12 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
pointer,
newPointer, //does not actually affect the current pointer!
step,
address,
context,
Function sections
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(definitions, refs, scopes) => {
let sections = {
builtin: [],
global: [],
contract: [],
Function runSpawn
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async runSpawn(inputStrings, options) {
let childPath;
/* eslint-disable no-undef */
if (typeof BUNDLE_CONSOLE_CHILD_FILENAME !== "undefined") {
childPath = path.join(__dirname, BUNDLE_CONSOLE_CHILD_FILENAME);
Function printVariables
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async printVariables(sectionOuts = this.sectionPrintouts) {
const values = await this.session.variables();
const sections = this.session.view(data.current.identifiers.sections);
const sectionNames = {
Function collectBlocks
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async collectBlocks(options: {
run: Process.ProcessorRunner;
network: Pick<Input<"networks">, "name" | "networkId">;
blocks: (DataModel.Block | undefined)[];
settings?: {
Function parseImports
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function parseImports(body) {
// WARNING: We're going to do this crudely with regexes!!
//
// Vyper has a rigid enough syntax that I think this is workable.
//