Ikagaka/NanikaStorage

View on GitHub

Showing 24 of 36 total issues

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

  async balloons() {
    return (await this.balloonBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaBalloonDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 191..194
lib/nanika-storage.ts on lines 216..219
lib/nanika-storage.ts on lines 224..227
lib/nanika-storage.ts on lines 232..235
lib/nanika-storage.ts on lines 240..243

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

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

  async calendarPlugins() {
    return (await this.calendarPluginBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaCalendarPluginDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 191..194
lib/nanika-storage.ts on lines 199..202
lib/nanika-storage.ts on lines 216..219
lib/nanika-storage.ts on lines 224..227
lib/nanika-storage.ts on lines 232..235

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

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

  async calendarSkins() {
    return (await this.calendarSkinBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaCalendarSkinDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 191..194
lib/nanika-storage.ts on lines 199..202
lib/nanika-storage.ts on lines 216..219
lib/nanika-storage.ts on lines 224..227
lib/nanika-storage.ts on lines 240..243

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

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

  async ghosts() {
    return (await this.ghostBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaGhostDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 199..202
lib/nanika-storage.ts on lines 216..219
lib/nanika-storage.ts on lines 224..227
lib/nanika-storage.ts on lines 232..235
lib/nanika-storage.ts on lines 240..243

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

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

  async headlines() {
    return (await this.headlineBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaHeadlineDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 191..194
lib/nanika-storage.ts on lines 199..202
lib/nanika-storage.ts on lines 216..219
lib/nanika-storage.ts on lines 232..235
lib/nanika-storage.ts on lines 240..243

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

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

  async plugins() {
    return (await this.pluginBase().filteredChildren(async (child) => await child.isDirectory()))
      .map((child) => new NanikaPluginDirectory(child.toString()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 191..194
lib/nanika-storage.ts on lines 199..202
lib/nanika-storage.ts on lines 224..227
lib/nanika-storage.ts on lines 232..235
lib/nanika-storage.ts on lines 240..243

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

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

export class NanikaPluginDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/plugin.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 617..627
lib/nanika-storage.ts on lines 629..639

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

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

export class NanikaCalendarPluginDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/calendar.plugin.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 617..627

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

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

export class NanikaShellDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/shell.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 617..627
lib/nanika-storage.ts on lines 629..639

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

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

export class NanikaGhostMasterDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/ghost.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 617..627
lib/nanika-storage.ts on lines 629..639

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

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

export class NanikaCalendarSkinDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/calendar.skin.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 629..639

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

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

export class NanikaHeadlineDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/headline.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 569..579
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 617..627
lib/nanika-storage.ts on lines 629..639

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

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

export class NanikaBalloonDirectory extends NanikaContainerDirectory {
  /** profile のファイルパス */
  profile() {
    return this.new("profile/balloon.profile.json");
  }
Severity: Major
Found in lib/nanika-storage.ts and 6 other locations - About 1 hr to fix
lib/nanika-storage.ts on lines 557..567
lib/nanika-storage.ts on lines 581..591
lib/nanika-storage.ts on lines 593..603
lib/nanika-storage.ts on lines 605..615
lib/nanika-storage.ts on lines 617..627
lib/nanika-storage.ts on lines 629..639

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

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

  async calendarPluginNames() {
    return Promise.all((await this.calendarPlugins()).map((child) => child.name()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 4 other locations - About 50 mins to fix
lib/nanika-storage.ts on lines 251..253
lib/nanika-storage.ts on lines 264..266
lib/nanika-storage.ts on lines 269..271
lib/nanika-storage.ts on lines 274..276

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

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

  async calendarSkinNames() {
    return Promise.all((await this.calendarSkins()).map((child) => child.name()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 4 other locations - About 50 mins to fix
lib/nanika-storage.ts on lines 251..253
lib/nanika-storage.ts on lines 264..266
lib/nanika-storage.ts on lines 269..271
lib/nanika-storage.ts on lines 279..281

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

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

  async balloonNames() {
    return Promise.all((await this.balloons()).map((child) => child.name()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 4 other locations - About 50 mins to fix
lib/nanika-storage.ts on lines 264..266
lib/nanika-storage.ts on lines 269..271
lib/nanika-storage.ts on lines 274..276
lib/nanika-storage.ts on lines 279..281

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

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

  async pluginNames() {
    return Promise.all((await this.plugins()).map((child) => child.name()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 4 other locations - About 50 mins to fix
lib/nanika-storage.ts on lines 251..253
lib/nanika-storage.ts on lines 269..271
lib/nanika-storage.ts on lines 274..276
lib/nanika-storage.ts on lines 279..281

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

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

  async headlineNames() {
    return Promise.all((await this.headlines()).map((child) => child.name()));
  }
Severity: Major
Found in lib/nanika-storage.ts and 4 other locations - About 50 mins to fix
lib/nanika-storage.ts on lines 251..253
lib/nanika-storage.ts on lines 264..266
lib/nanika-storage.ts on lines 274..276
lib/nanika-storage.ts on lines 279..281

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

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

  private async _installBalloon(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
    return await this._installSingleContainer(nar, install, "balloon", this.balloon(install.directory));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 45 mins to fix
lib/nanika-storage.ts on lines 468..470
lib/nanika-storage.ts on lines 472..474
lib/nanika-storage.ts on lines 476..478
lib/nanika-storage.ts on lines 480..482
lib/nanika-storage.ts on lines 484..486

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

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

  private async _installCalendarPlugin(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
    return await this._installSingleContainer(nar, install, "calendar.plugin", this.calendarPlugin(install.directory));
  }
Severity: Major
Found in lib/nanika-storage.ts and 5 other locations - About 45 mins to fix
lib/nanika-storage.ts on lines 464..466
lib/nanika-storage.ts on lines 468..470
lib/nanika-storage.ts on lines 472..474
lib/nanika-storage.ts on lines 476..478
lib/nanika-storage.ts on lines 484..486

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

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