trufflesuite/truffle

View on GitHub

Showing 685 of 1,401 total issues

Function validate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  validate: function (contractObj) {
    var ajv = new Ajv({ verbose: true });
    ajv.addSchema(abiSchema);
    ajv.addSchema(networkObjectSchema);
    ajv.addSchema(contractObjectSchema);
Severity: Minor
Found in packages/contract-schema/index.js - About 1 hr to fix

    Function iterate has 39 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      *iterate({ inputs }) {
        for (const [compilationIndex, { sources, contracts }] of inputs.entries()) {
          for (const [sourceIndex, source] of sources.entries()) {
            yield {
              input: source,
    Severity: Minor
    Found in packages/db/src/project/loadCompile/sources.ts - About 1 hr to fix

      Function Middle has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function Middle(): JSX.Element {
        const {
          state: { providerMessages }
        } = useDash()!;
        const numRequests = providerMessages.size;
      Severity: Minor
      Found in packages/dashboard/src/components/composed/Sidebar/Middle/index.tsx - About 1 hr to fix

        Function collectSources has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export function collectSources(
          originalSources: Sources,
          originalTargets: string[] = [],
          baseDirectory: string = "",
          replacement: string = "/"
        Severity: Minor
        Found in packages/compile-common/src/sources.ts - About 1 hr to fix

          Function aboutToModify has 38 lines of code (exceeds 25 allowed). Consider refactoring.
          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
          Severity: Minor
          Found in packages/debugger/lib/data/selectors/index.js - About 1 hr to fix

            Function exports has 38 lines of code (exceeds 25 allowed). Consider refactoring.
            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}` +
            Severity: Minor
            Found in packages/core/lib/commands/watch/run.js - About 1 hr to fix

              Function listVersions has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const listVersions = async function (options) {
                const { CompilerSupplier } = require("@truffle/compile-solidity");
                const { asyncTake } = require("iter-tools");
              
                const supplier = new CompilerSupplier({
              Severity: Minor
              Found in packages/core/lib/commands/compile/run.js - About 1 hr to fix

                Function fetchExternalSources has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                  async fetchExternalSources(bugger) {
                    const fetchSpinner = new Spinner(
                      "core:debug:cli:fetch",
                      "Getting and compiling external sources..."
                    );
                Severity: Minor
                Found in packages/core/lib/debug/cli.js - About 1 hr to fix

                  Function request has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    private async request({
                      method,
                      params,
                      formatOutput
                    }: SendRequestArgs): Promise<any> {
                  Severity: Minor
                  Found in packages/encoder/lib/adapter.ts - About 1 hr to fix

                    Function interpretTryAggregate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      private async interpretTryAggregate(
                        decoding: Codec.CalldataDecoding,
                        transaction: DecoderTypes.Transaction,
                        additionalContexts: Contexts.Contexts = {},
                        additionalAllocations?: {
                    Severity: Minor
                    Found in packages/decoder/lib/decoders.ts - About 1 hr to fix

                      Function getTruffleDashboardUserConfig has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                      function getTruffleDashboardUserConfig(
                        config: HardhatConfig,
                        userConfig: HardhatUserConfig
                      ) {
                        const {
                      Severity: Minor
                      Found in packages/dashboard-hardhat-plugin/src/index.ts - About 1 hr to fix

                        Function readAndParseArtifactFiles has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function readAndParseArtifactFiles(
                          paths: string[],
                          contracts_build_directory: string
                        ): SourceFilesArtifacts {
                          const sourceFilesArtifacts: SourceFilesArtifacts = {};
                        Severity: Minor
                        Found in packages/profiler/src/updated.ts - About 1 hr to fix

                          Function requiredSources has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            async requiredSources(options: any) {
                              expect.options(options, [
                                "paths",
                                "base_path",
                                "resolver",
                          Severity: Minor
                          Found in packages/profiler/src/index.ts - About 1 hr to fix

                            Function fetchSourcesForAddressAndMatchType has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              private async fetchSourcesForAddressAndMatchType(
                                address: string,
                                matchType: "full" | "partial"
                              ): Promise<Types.SourceInfo | null> {
                                const metadata = await this.getMetadata(address, matchType);
                            Severity: Minor
                            Found in packages/source-fetcher/lib/sourcify.ts - About 1 hr to fix

                              Function instantExternalCall has 12 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                pointer,
                                newPointer, //does not actually affect the current pointer!
                                step,
                                address,
                                context,
                              Severity: Major
                              Found in packages/debugger/lib/txlog/actions/index.js - About 1 hr to fix

                                Function sections has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        (definitions, refs, scopes) => {
                                          let sections = {
                                            builtin: [],
                                            global: [],
                                            contract: [],
                                Severity: Minor
                                Found in packages/debugger/lib/data/selectors/index.js - About 1 hr to fix

                                  Function runSpawn has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                  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);
                                  Severity: Minor
                                  Found in packages/core/lib/console.js - About 1 hr to fix

                                    Function printVariables has 37 lines of code (exceeds 25 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 = {
                                    Severity: Minor
                                    Found in packages/core/lib/debug/printer.js - About 1 hr to fix

                                      Function collectBlocks has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                        static async collectBlocks(options: {
                                          run: Process.ProcessorRunner;
                                          network: Pick<Input<"networks">, "name" | "networkId">;
                                          blocks: (DataModel.Block | undefined)[];
                                          settings?: {
                                      Severity: Minor
                                      Found in packages/db/src/network/index.ts - About 1 hr to fix

                                        Function parseImports has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                        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.
                                          //
                                        Severity: Minor
                                        Found in packages/compile-vyper/parser.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language