jasonwoods-7/Vandelay

View on GitHub

Showing 14 of 19 total issues

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

          public HostingImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
          {
            AggregateCatalog = new AggregateCatalogImports(findType, moduleDefinition);
            CompositionContainer =new CompositionContainerImports(findType, moduleDefinition);
            DirectoryCatalog = new DirectoryCatalogImports(findType, moduleDefinition);
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 1 other location - About 1 hr to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 102..109

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

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

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

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

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

Refactorings

Further Reading

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

        public CompositionImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
        {
          ImportManyAttribute = new ImportManyAttributeImports(findType, moduleDefinition);
          Hosting = new HostingImports(findType, moduleDefinition);
          AttributedModelServices = new AttributedModelServicesImports(findType, moduleDefinition);
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 1 other location - About 1 hr to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 131..138

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

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

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

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

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

Refactorings

Further Reading

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

        constructor.Body.Instructions.Add(Instruction.Create(OpCodes.Callvirt,
          ModuleDefinition.ImportReference(_import.System.Collections.Generic.ICollection.Add.MakeGeneric(
            _import.System.ComponentModel.Composition.Primitives.ComposablePartCatalog.Type))));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.Retriever.cs and 1 other location - About 1 hr to fix
Vandelay.Fody/ModuleWeaver.Retriever.cs on lines 175..177

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

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

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

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

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

Refactorings

Further Reading

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

      constructor.Body.Instructions.Add(Instruction.Create(OpCodes.Callvirt,
        ModuleDefinition.ImportReference(_import.System.Collections.Generic.ICollection.Add.MakeGeneric(
          _import.System.ComponentModel.Composition.Primitives.ComposablePartCatalog.Type))));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.Retriever.cs and 1 other location - About 1 hr to fix
Vandelay.Fody/ModuleWeaver.Retriever.cs on lines 196..198

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

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

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

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

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

Refactorings

Further Reading

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

        internal class ImportManyAttributeImports
        {
          public ImportManyAttributeImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
          {
            var importManyType = findType("System.ComponentModel.Composition.ImportManyAttribute");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 55 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 271..281
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 334..344

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

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

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

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

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

Refactorings

Further Reading

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

        internal class ExportAttributeImports
        {
          public ExportAttributeImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
          {
            var attributeType = findType("System.ComponentModel.Composition.ExportAttribute");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 55 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 117..127
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 334..344

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

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

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

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

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

Refactorings

Further Reading

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

      internal class DirectoryImports
      {
        public DirectoryImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
        {
          var directoryType = findType("System.IO.Directory");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 55 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 117..127
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 271..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 84.

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

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

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

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

Refactorings

Further Reading

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

      internal class DebuggerNonUserCodeAttributeImports
      {
        public DebuggerNonUserCodeAttributeImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
        {
          var attributeType = findType("System.Diagnostics.DebuggerNonUserCodeAttribute");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 50 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 346..356
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 359..369

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

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

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

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

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

Refactorings

Further Reading

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

      internal class FileSystemInfoImports
      {
        public FileSystemInfoImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
        {
          var infoType = findType("System.IO.FileSystemInfo");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 50 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 359..369
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 380..390

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

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

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

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

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

Refactorings

Further Reading

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

    internal class IDisposableImports
    {
      public IDisposableImports(Func<string, TypeDefinition> findType, ModuleDefinition moduleDefinition)
      {
        var disposableType = findType("System.IDisposable");
Severity: Major
Found in Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs and 2 other locations - About 50 mins to fix
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 346..356
Vandelay.Fody/ModuleWeaver.ReferenceFinder.cs on lines 380..390

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

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

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

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

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

Refactorings

Further Reading

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

    yield return Instruction.Create(OpCodes.Callvirt, ModuleDefinition.ImportReference(
      _import.System.Collections.Generic.Dictionary.SetItem.MakeGeneric(
        TypeSystem.StringReference, TypeSystem.ObjectReference)));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.CompositionBatch.cs and 1 other location - About 35 mins to fix
Vandelay.Fody/ModuleWeaver.CompositionBatch.cs on lines 99..102

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

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

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

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

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

Refactorings

Further Reading

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

    yield return Instruction.Create(OpCodes.Newobj,
      ModuleDefinition.ImportReference(
        _import.System.Collections.Generic.Dictionary.Constructor.MakeGeneric(
          TypeSystem.StringReference, TypeSystem.ObjectReference)));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.CompositionBatch.cs and 1 other location - About 35 mins to fix
Vandelay.Fody/ModuleWeaver.CompositionBatch.cs on lines 109..111

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

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

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

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

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

Refactorings

Further Reading

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

    constructor.Body.Instructions.Add(Instruction.Create(OpCodes.Call,
      new MethodReference(".ctor", TypeSystem.VoidReference,
        TypeSystem.ObjectReference)
        { HasThis = true }));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.Retriever.cs and 1 other location - About 30 mins to fix
Vandelay.Fody/ModuleWeaver.ExportValueProvider.cs on lines 54..57

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

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

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

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

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

Refactorings

Further Reading

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

    constructor.Body.Instructions.Add(Instruction.Create(OpCodes.Call,
      new MethodReference(".ctor", TypeSystem.VoidReference,
          TypeSystem.ObjectReference)
        { HasThis = true }));
Severity: Minor
Found in Vandelay.Fody/ModuleWeaver.ExportValueProvider.cs and 1 other location - About 30 mins to fix
Vandelay.Fody/ModuleWeaver.Retriever.cs on lines 103..106

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

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