neet/refined-itsukara-link

View on GitHub

Showing 196 of 278 total issues

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

export class ShowOrganizationYoutubeChannelIdNotFoundError extends AppError {
  public readonly name = 'ShowOrganizationNotFoundError';

  public constructor(public readonly id: YoutubeChannelId) {
    super(`Organization with YouTube Channel ID ${id} was not found`);
packages/@neet/vschedule-api/src/app/channel/request-channel-subscription.ts on lines 9..15
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 19..27
packages/@neet/vschedule-api/src/app/media-attachment/show-media-attachment.ts on lines 8..14
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 9..15
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 9..15
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 17..25
packages/@neet/vschedule-api/src/app/stream/show-stream.ts on lines 9..15
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 13..19
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 21..27

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 49.

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

const Timetable = dynamic<TimetableProps>(
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
  async () => import('../components/ui/Timetable').then((m) => m.Timetable),
  { ssr: false },
);
Severity: Minor
Found in packages/@neet/vschedule-client/src/pages/index.tsx and 1 other location - About 40 mins to fix
packages/@neet/vschedule-client/src/pages/streams.tsx on lines 26..30

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 49.

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 10 locations. Consider refactoring.
Open

export class RequestChannelSubscriptionNotFoundError extends AppError {
  readonly name = 'RequestChannelSubscriptionNotFoundError';

  constructor(readonly id: ChannelId) {
    super(`Channel with id ${id} was not found`);
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 19..27
packages/@neet/vschedule-api/src/app/media-attachment/show-media-attachment.ts on lines 8..14
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 9..15
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 17..23
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 9..15
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 17..25
packages/@neet/vschedule-api/src/app/stream/show-stream.ts on lines 9..15
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 13..19
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 21..27

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 49.

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 10 locations. Consider refactoring.
Open

export class ShowPerformerNotFoundError extends AppError {
  public readonly name = 'ShowPerformerNotFoundError';

  public constructor(public readonly performerId: PerformerId) {
    super(`Performer with ID ${performerId} was not found`);
packages/@neet/vschedule-api/src/app/channel/request-channel-subscription.ts on lines 9..15
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 19..27
packages/@neet/vschedule-api/src/app/media-attachment/show-media-attachment.ts on lines 8..14
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 9..15
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 17..23
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 17..25
packages/@neet/vschedule-api/src/app/stream/show-stream.ts on lines 9..15
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 13..19
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 21..27

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 49.

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 10 locations. Consider refactoring.
Open

export class VerifyYoutubeChannelSubscriptionUnknownChannelError extends AppError {
  public readonly name = 'VerifyYoutubeChannelSubscriptionUnknownChannelError';

  public constructor(public readonly youtubeChannelId: YoutubeChannelId) {
    super(
packages/@neet/vschedule-api/src/app/channel/request-channel-subscription.ts on lines 9..15
packages/@neet/vschedule-api/src/app/media-attachment/show-media-attachment.ts on lines 8..14
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 9..15
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 17..23
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 9..15
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 17..25
packages/@neet/vschedule-api/src/app/stream/show-stream.ts on lines 9..15
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 13..19
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 21..27

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 49.

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

const Timetable = dynamic<TimetableProps>(
  // eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
  async () => import('../components/ui/Timetable').then((m) => m.Timetable),
  { ssr: false },
);
Severity: Minor
Found in packages/@neet/vschedule-client/src/pages/streams.tsx and 1 other location - About 40 mins to fix
packages/@neet/vschedule-client/src/pages/index.tsx on lines 25..29

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 49.

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 10 locations. Consider refactoring.
Open

export class ShowStreamNotFoundError extends AppError {
  public readonly name = 'ShowStreamNotFoundError';

  public constructor(public readonly streamId: StreamId) {
    super(`Stream with ID ${streamId} was not found`);
Severity: Major
Found in packages/@neet/vschedule-api/src/app/stream/show-stream.ts and 9 other locations - About 40 mins to fix
packages/@neet/vschedule-api/src/app/channel/request-channel-subscription.ts on lines 9..15
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 19..27
packages/@neet/vschedule-api/src/app/media-attachment/show-media-attachment.ts on lines 8..14
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 9..15
packages/@neet/vschedule-api/src/app/organization/show-organization.ts on lines 17..23
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 9..15
packages/@neet/vschedule-api/src/app/performer/show-performer.ts on lines 17..25
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 13..19
packages/@neet/vschedule-api/src/domain/services/channel-service.ts on lines 21..27

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 49.

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

const useGenreQueryParam = (): number | undefined => {
  const queryGenre = useSearchParam('genre');
  return queryGenre != null ? Number(queryGenre) : undefined;
};
Severity: Minor
Found in packages/@neet/vschedule-client/src/pages/streams.tsx and 1 other location - About 40 mins to fix
packages/@neet/vschedule-client/src/pages/index.tsx on lines 35..38

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 49.

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

const useGenreQueryParam = (): number | undefined => {
  const queryGenre = useSearchParam('genre');
  return queryGenre != null ? Number(queryGenre) : undefined;
};
Severity: Minor
Found in packages/@neet/vschedule-client/src/pages/index.tsx and 1 other location - About 40 mins to fix
packages/@neet/vschedule-client/src/pages/streams.tsx on lines 36..39

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 49.

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

  const { styles, attributes } = usePopper(wrapperRef, cardRef, {
    placement: 'bottom',
    modifiers: [{ name: 'flip', enabled: true }],
  });
packages/@neet/vschedule-client/src/components/app/EventMarker/EventMarker.tsx on lines 33..36

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 48.

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

  const { styles, attributes } = usePopper(wrapperRef, cardRef, {
    placement: 'bottom',
    modifiers: [{ name: 'flip', enabled: true }],
  });
packages/@neet/vschedule-client/src/components/app/StreamMarker/StreamMarker.tsx on lines 32..35

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 48.

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 4 locations. Consider refactoring.
Open

export class RemoveStreamNotFoundError extends AppError {
  public readonly name = 'RemoveStreamNotFoundError';

  public constructor(public readonly url: string) {
    super(`No stream found with ID ${url}`);
Severity: Major
Found in packages/@neet/vschedule-api/src/app/stream/remove-stream.ts and 3 other locations - About 35 mins to fix
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 11..17
packages/@neet/vschedule-api/src/app/stream/stream-factory-impl.ts on lines 28..34
packages/@neet/vschedule-api/src/app/user/login.ts on lines 8..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 47.

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 4 locations. Consider refactoring.
Open

export class VerifyYoutubeChannelSubscriptionInvalidTopicError extends AppError {
  public readonly name = 'VerifyYoutubeChannelSubscriptionInvalidTopicError';

  public constructor(public readonly topic: string) {
    super(`Invalid topic ${topic}`);
packages/@neet/vschedule-api/src/app/stream/remove-stream.ts on lines 8..14
packages/@neet/vschedule-api/src/app/stream/stream-factory-impl.ts on lines 28..34
packages/@neet/vschedule-api/src/app/user/login.ts on lines 8..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 47.

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 3 locations. Consider refactoring.
Open

const genres: NextApiHandler = async (_req, res) => {
  const data = await api.fetchGenres();
  res.json(data);
};
packages/@neet/vschedule-client/src/pages/api/v1.2/events.json.ts on lines 5..8
packages/@neet/vschedule-client/src/pages/api/v1.2/livers.json.ts on lines 6..9

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 47.

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 4 locations. Consider refactoring.
Open

export class LoginAccountNotFoundError extends AppError {
  public readonly name = 'LoginAccountNotFoundError';

  public constructor(public readonly email: string) {
    super(`No account found with email ${email}`);
Severity: Major
Found in packages/@neet/vschedule-api/src/app/user/login.ts and 3 other locations - About 35 mins to fix
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 11..17
packages/@neet/vschedule-api/src/app/stream/remove-stream.ts on lines 8..14
packages/@neet/vschedule-api/src/app/stream/stream-factory-impl.ts on lines 28..34

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 47.

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

  try {
    await client.$executeRawUnsafe(`DROP DATABASE ${testDb.name}`);
  } finally {
    await client.$disconnect();
  }
Severity: Minor
Found in packages/@neet/vschedule-api/test-utils/jest-global-teardown.ts and 1 other location - About 35 mins to fix
packages/@neet/vschedule-api/test-utils/jest-global-setup.ts on lines 21..25

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 47.

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 class ShowUserNotFoundError extends AppError {
  public readonly name = 'ShowUserNotFoundError';

  constructor(id: UserId) {
    super(`User with id ${id} was not found`);
Severity: Minor
Found in packages/@neet/vschedule-api/src/app/user/show-user.ts and 1 other location - About 35 mins to fix
packages/@neet/vschedule-api/src/app/performer/upsert-performer.ts on lines 19..25

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 47.

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

    try {
      await client.$executeRawUnsafe(`CREATE DATABASE ${testDb.name}`);
    } finally {
      await client.$disconnect();
    }
Severity: Minor
Found in packages/@neet/vschedule-api/test-utils/jest-global-setup.ts and 1 other location - About 35 mins to fix
packages/@neet/vschedule-api/test-utils/jest-global-teardown.ts on lines 14..18

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 47.

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 4 locations. Consider refactoring.
Open

export class CreateStreamPerformerNotFoundWithChannelIdError extends AppError {
  public readonly name = 'CreateStreamPerformerNotFoundWithChannelIdError';

  public constructor(public readonly channelId: string) {
    super(`Performer was not found with channel ID ${channelId}`);
packages/@neet/vschedule-api/src/app/channel/verify-youtube-channel-subscription.ts on lines 11..17
packages/@neet/vschedule-api/src/app/stream/remove-stream.ts on lines 8..14
packages/@neet/vschedule-api/src/app/user/login.ts on lines 8..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 47.

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 3 locations. Consider refactoring.
Open

const events: NextApiHandler = async (_req, res) => {
  const data = await api.fetchEvents();
  res.json(data);
};
packages/@neet/vschedule-client/src/pages/api/v1.2/genres.json.ts on lines 5..8
packages/@neet/vschedule-client/src/pages/api/v1.2/livers.json.ts on lines 6..9

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 47.

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