polkadot-js/tools

View on GitHub
packages/metadata-cmp/src/runcli.ts

Summary

Maintainability
B
5 hrs
Test Coverage

Function main has 95 lines of code (exceeds 25 allowed). Consider refactoring.
Open

async function main (): Promise<number> {
  const [[regA, metaA, verA], [regB, metaB, verB]] = await Promise.all([getMetadata(ws1), getMetadata(ws2)]);
  const a = metaA.asLatest;
  const b = metaB.asLatest;

Severity: Major
Found in packages/metadata-cmp/src/runcli.ts - About 3 hrs to fix

    Function log has 5 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function log (pad: number, title: string, pre: string, text: string, post?: string) {
    Severity: Minor
    Found in packages/metadata-cmp/src/runcli.ts - About 35 mins to fix

      Function createLog has 5 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function createLog (pad: number, title: string, pre: string, text: string, post?: string): string {
      Severity: Minor
      Found in packages/metadata-cmp/src/runcli.ts - About 35 mins to fix

        Function logArray has 5 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        function logArray (pad: number, title: string, pre: string, arr: string[], chunkSize: number) {
        Severity: Minor
        Found in packages/metadata-cmp/src/runcli.ts - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status