domjtalbot/nx-mesh

View on GitHub

Showing 553 of 553 total issues

Function buildExecutor has 108 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export default async function* buildExecutor(
  options: BuildSWCExecutorSchema,
  context: ExecutorContext
) {
  if (options.dir === undefined) {
Severity: Major
Found in packages/nx-mesh/src/executors/build-swc/build-swc.ts - About 4 hrs to fix

    Function buildExecutor has 104 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default async function* buildExecutor(
      options: BuildExecutorSchema,
      context: ExecutorContext
    ) {
      if (options.dir === undefined) {
    Severity: Major
    Found in packages/nx-mesh/src/executors/build/build.ts - About 4 hrs to fix

      Function compileSwcWatch has 88 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export async function* compileSwcWatch(
        context: ExecutorContext,
        normalizedOptions: NormalizedSwcExecutorOptions,
        postCompilationCallback: () => Promise<void>
      ) {
      Severity: Major
      Found in packages/nx-mesh/src/executors/build-swc/swc-executor/compile-swc.ts - About 3 hrs to fix

        File base.spec.ts has 304 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import type { Tree } from '@nrwl/devkit';
        import type { BaseOptions } from './schema';
        
        import * as devkit from '@nrwl/devkit/';
        import { getProjects, readJson } from '@nrwl/devkit';
        Severity: Minor
        Found in packages/nx-mesh/src/generators/base/base.spec.ts - About 3 hrs to fix

          Function addProjectConfig has 79 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export function addProjectConfig(tree: Tree, options: NormalizedOptions) {
            const {
              codegen,
              isApp,
              isLibrary,
          Severity: Major
          Found in packages/nx-mesh/src/generators/base/lib/add-project-config.ts - About 3 hrs to fix

            Function swcExecutor has 76 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export async function* swcExecutor(
              _options: SwcExecutorOptions,
              context: ExecutorContext
            ) {
              const { sourceRoot, root } =
            Severity: Major
            Found in packages/nx-mesh/src/executors/build-swc/swc-executor/swc.impl.ts - About 3 hrs to fix

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              export const getStaticProps: GetStaticProps<PageData> = async () => {
                const { getMeshSDK } = await import(
                  '@nx-mesh/examples-sdk-odata--trippin/sdk'
                );
              
              
              Severity: Major
              Found in examples/sdk-nextjs/pages/sources/odata/trippin.tsx and 1 other location - About 2 hrs to fix
              examples/sdk-nextjs/pages/sources/openapi/javascript-wiki.tsx on lines 8..19

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 93.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Similar blocks of code found in 2 locations. Consider refactoring.
              Open

              export const getStaticProps: GetStaticProps<PageData> = async () => {
                const { getMeshSDK } = await import(
                  '@nx-mesh/examples-sdk-openapi--javascript-wiki/sdk'
                );
              
              
              examples/sdk-nextjs/pages/sources/odata/trippin.tsx on lines 6..17

              Duplicated Code

              Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

              Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

              When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

              Tuning

              This issue has a mass of 93.

              We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

              The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

              If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

              See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

              Refactorings

              Further Reading

              Function normalizeOptions has 68 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              export function normalizeOptions(
                tree: Tree,
                options: BaseOptions
              ): NormalizedOptions {
                const workspace = getWorkspaceLayout(tree);
              Severity: Major
              Found in packages/nx-mesh/src/generators/base/lib/normalize-options.ts - About 2 hrs to fix

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                      if (success) {
                        if (options.debug) {
                          logger.debug('');
                          logger.debug('Creating package.json...');
                        }
                Severity: Major
                Found in packages/nx-mesh/src/executors/build/build.ts and 1 other location - About 2 hrs to fix
                packages/nx-mesh/src/executors/build-swc/build-swc.ts on lines 113..129

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 85.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                      if (success) {
                        if (options.debug) {
                          logger.debug('');
                          logger.debug('Creating package.json...');
                        }
                Severity: Major
                Found in packages/nx-mesh/src/executors/build-swc/build-swc.ts and 1 other location - About 2 hrs to fix
                packages/nx-mesh/src/executors/build/build.ts on lines 110..126

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 85.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    it.each([
                      ['undefined', undefined],
                      ['empty string', ''],
                    ])('should remove arguments with undefined values', (type, value) => {
                      const result = getCliArguments({
                Severity: Major
                Found in packages/nx-mesh/src/utils/mesh-cli/arguments.spec.ts and 1 other location - About 2 hrs to fix
                packages/nx-mesh/src/utils/graphql-codegen-cli/arguments.spec.ts on lines 108..116

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 75.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  await new Promise<void>((resolve) => {
                    childProcess?.stdout?.on('data', (chunk) => {
                      if (chunk.toString().indexOf(readyWhenMsg) > -1) {
                        resolve();
                      }
                Severity: Major
                Found in packages/nx-mesh/src/executors/dev/dev.ts and 1 other location - About 2 hrs to fix
                packages/nx-mesh/src/executors/start/start.ts on lines 50..56

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 75.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                  await new Promise<void>((resolve) => {
                    childProcess?.stdout?.on('data', (chunk) => {
                      if (chunk.toString().indexOf(readyWhenMsg) > -1) {
                        resolve();
                      }
                Severity: Major
                Found in packages/nx-mesh/src/executors/start/start.ts and 1 other location - About 2 hrs to fix
                packages/nx-mesh/src/executors/dev/dev.ts on lines 46..52

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 75.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    it.each([
                      ['undefined', undefined],
                      ['empty string', ''],
                    ])('should remove arguments with undefined values', (type, value) => {
                      const result = getCliArguments({
                packages/nx-mesh/src/utils/mesh-cli/arguments.spec.ts on lines 63..71

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 75.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                export default {
                  displayName: 'examples-sdk-mysql-rfam',
                  preset: '../../jest.preset.js',
                  testEnvironment: 'node',
                  transform: {
                Severity: Major
                Found in examples/sdk-mysql--rfam/jest.config.ts and 5 other locations - About 1 hr to fix
                examples/sdk-graphql--star-wars/jest.config.ts on lines 2..14
                examples/sdk-json-schema--fake-api/jest.config.ts on lines 2..14
                examples/sdk-neo4j--movies/jest.config.ts on lines 2..14
                examples/sdk-openapi--javascript-wiki/jest.config.ts on lines 2..14
                examples/sdk-soap--country-info/jest.config.ts on lines 2..14

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 74.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                export default {
                  displayName: 'examples-sdk-graphql--star-wars',
                  preset: '../../jest.preset.js',
                  testEnvironment: 'node',
                  transform: {
                Severity: Major
                Found in examples/sdk-graphql--star-wars/jest.config.ts and 5 other locations - About 1 hr to fix
                examples/sdk-json-schema--fake-api/jest.config.ts on lines 2..14
                examples/sdk-mysql--rfam/jest.config.ts on lines 2..14
                examples/sdk-neo4j--movies/jest.config.ts on lines 2..14
                examples/sdk-openapi--javascript-wiki/jest.config.ts on lines 2..14
                examples/sdk-soap--country-info/jest.config.ts on lines 2..14

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 74.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                export default {
                  displayName: 'examples-sdk-soap-country-info',
                  preset: '../../jest.preset.js',
                  testEnvironment: 'node',
                  transform: {
                Severity: Major
                Found in examples/sdk-soap--country-info/jest.config.ts and 5 other locations - About 1 hr to fix
                examples/sdk-graphql--star-wars/jest.config.ts on lines 2..14
                examples/sdk-json-schema--fake-api/jest.config.ts on lines 2..14
                examples/sdk-mysql--rfam/jest.config.ts on lines 2..14
                examples/sdk-neo4j--movies/jest.config.ts on lines 2..14
                examples/sdk-openapi--javascript-wiki/jest.config.ts on lines 2..14

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 74.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                export default {
                  displayName: 'examples-sdk-openapi-javascript-wiki',
                  preset: '../../jest.preset.js',
                  testEnvironment: 'node',
                  transform: {
                Severity: Major
                Found in examples/sdk-openapi--javascript-wiki/jest.config.ts and 5 other locations - About 1 hr to fix
                examples/sdk-graphql--star-wars/jest.config.ts on lines 2..14
                examples/sdk-json-schema--fake-api/jest.config.ts on lines 2..14
                examples/sdk-mysql--rfam/jest.config.ts on lines 2..14
                examples/sdk-neo4j--movies/jest.config.ts on lines 2..14
                examples/sdk-soap--country-info/jest.config.ts on lines 2..14

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 74.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                export default {
                  displayName: 'examples-sdk-json-schema--fake-api',
                  preset: '../../jest.preset.js',
                  testEnvironment: 'node',
                  transform: {
                Severity: Major
                Found in examples/sdk-json-schema--fake-api/jest.config.ts and 5 other locations - About 1 hr to fix
                examples/sdk-graphql--star-wars/jest.config.ts on lines 2..14
                examples/sdk-mysql--rfam/jest.config.ts on lines 2..14
                examples/sdk-neo4j--movies/jest.config.ts on lines 2..14
                examples/sdk-openapi--javascript-wiki/jest.config.ts on lines 2..14
                examples/sdk-soap--country-info/jest.config.ts on lines 2..14

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 74.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Severity
                Category
                Status
                Source
                Language