Ikagaka/NanikaStorage

View on GitHub
lib/nanika-storage.ts

Summary

Maintainability
F
5 days
Test Coverage

NanikaStorage has 54 functions (exceeds 20 allowed). Consider refactoring.
Open

export class NanikaStorage extends NanikaBaseDirectory {
  private static async _filterRemove(target: FileSystemObject, exceptPaths: string[]) {
    let toRemoveChildren: FileSystemObject[];
    try {
      toRemoveChildren = await target.filteredChildrenAll(exceptPaths);
Severity: Major
Found in lib/nanika-storage.ts - About 7 hrs to fix

    File nanika-storage.ts has 373 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /** 伺かに必要なストレージ操作を扱うディレクトリオブジェクト */
    
    /** -- */ // doc comment が後にないとtypedocによってmoduleの情報が出力されないので
    
    import {FileSystemObject} from "fso";
    Severity: Minor
    Found in lib/nanika-storage.ts - About 4 hrs to fix

      Function _mergeInstallDirectory has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

        private static async _mergeInstallDirectory( // sourceをFileSystemObjectに変換するための苦肉の策
          source: HasNanikaContainerInfoDirectory | FileSystemObject, target: FileSystemObject, install: UkagakaInstallInfo,
        ) {
          if (install.refresh) {
            if (install.refreshundeletemask) {
      Severity: Minor
      Found in lib/nanika-storage.ts - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _filterRemove has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

        private static async _filterRemove(target: FileSystemObject, exceptPaths: string[]) {
          let toRemoveChildren: FileSystemObject[];
          try {
            toRemoveChildren = await target.filteredChildrenAll(exceptPaths);
          } catch (error) {
      Severity: Minor
      Found in lib/nanika-storage.ts - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      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

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

        private async _installPlugin(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
          return await this._installSingleContainer(nar, install, "plugin", this.plugin(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 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 _installSupplement(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
          return await this._installSingleContainer(nar, install, "supplement", this.ghost(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 480..482

      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 _installHeadline(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
          return await this._installSingleContainer(nar, install, "headline", this.headline(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 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 _installCalendarSkin(nar: HasNanikaContainerInfoDirectory, install: UkagakaInstallInfo) {
          return await this._installSingleContainer(nar, install, "calendar.skin", this.calendarSkin(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 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

      There are no issues that match your filters.

      Category
      Status