Ikagaka/NanikaStorage

View on GitHub

Showing 36 of 36 total issues

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

      File nanika-container-directory.ts has 311 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /** 伺かのコンテナを扱うディレクトリオブジェクト */
      
      /** -- */ // doc comment が後にないとtypedocによってmoduleの情報が出力されないので
      
      import * as fs from "fs";
      Severity: Minor
      Found in lib/nanika-container-directory.ts - About 3 hrs to fix

        NanikaContainerSyncDirectory has 26 functions (exceeds 20 allowed). Consider refactoring.
        Open

        export class NanikaContainerSyncDirectory extends NanikaContainerSyncEntry implements HasNanikaContainerInfoDirectory {
        
          private _childrenCache: Array<NanikaContainerSyncDirectory | NanikaContainerSyncFile>;
          private _childrenAllCache: NanikaContainerSyncFile[];
          private _indexes: {[path: string]: number} = {};
        Severity: Minor
        Found in lib/nanika-container-directory.ts - About 3 hrs to fix

          NanikaContainerSyncFile has 21 functions (exceeds 20 allowed). Consider refactoring.
          Open

          export class NanikaContainerSyncFile extends NanikaContainerSyncEntry {
            path: string;
            private _content: Buffer | null;
            private _stats: fs.Stats | null;
          
          
          Severity: Minor
          Found in lib/nanika-container-directory.ts - About 2 hrs to fix

            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

            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

            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

            Severity
            Category
            Status
            Source
            Language