mrklintscher/libfintx

View on GitHub

Showing 466 of 466 total issues

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

                if (String.IsNullOrEmpty(TAN_))
                {
                    sb = new StringBuilder();
                    sb.Append("HNSHA");
                    sb.Append(DEG.Separator);
Severity: Major
Found in src/libfintx.FinTS/Message/FinTsMessage.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Message/FinTsMessage.cs on lines 301..367

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

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

                if (String.IsNullOrEmpty(TAN_))
                {
                    sb = new StringBuilder();
                    sb.Append("HNSHA");
                    sb.Append(DEG.Separator);
Severity: Major
Found in src/libfintx.FinTS/Message/FinTsMessage.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Message/FinTsMessage.cs on lines 618..684

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

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

                    else
                    {
                        if (string.IsNullOrEmpty(Startpoint))
                        {
                            StringBuilder sb = new StringBuilder();
Severity: Major
Found in src/libfintx.FinTS/Segments/HKCAZ.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Segments/HKCAZ.cs on lines 119..188

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

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

                    else
                    {
                        if (string.IsNullOrEmpty(Startpoint))
                        {
                            StringBuilder sb = new StringBuilder();
Severity: Major
Found in src/libfintx.FinTS/Segments/HKCAZ.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Segments/HKCAZ.cs on lines 259..328

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

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

                {
                    sb = new StringBuilder();
                    sb.Append("HNVSK");
                    sb.Append(DEG.Separator);
                    sb.Append(Enc.SECFUNC_ENC_PLAIN);
Severity: Major
Found in src/libfintx.FinTS/Message/FinTsMessage.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Message/FinTsMessage.cs on lines 372..427

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

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

                {
                    sb = new StringBuilder();
                    sb.Append("HNVSK");
                    sb.Append(DEG.Separator);
                    sb.Append(Enc.SECFUNC_ENC_PLAIN);
Severity: Major
Found in src/libfintx.FinTS/Message/FinTsMessage.cs and 1 other location - About 1 day to fix
src/libfintx.FinTS/Message/FinTsMessage.cs on lines 430..485

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

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

Method Send_TAN has 315 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public static async Task<String> Send_TAN(FinTsClient client, string TAN)
        {
            Log.Write("Starting TAN process");
            string segments = string.Empty;

Severity: Major
Found in src/libfintx.FinTS/Tan/Tan.cs - About 1 day to fix

    File MT940.cs has 688 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using libfintx.FinTS.Swift;
    using libfintx.Globals;
    using libfintx.Logger.Log;
    using libfintx.Logger.Trace;
    using System;
    Severity: Major
    Found in src/libfintx.FinTS/MT940/MT940.cs - About 1 day to fix

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

              private (XmlDocument request, IList<string> segments) CreateInitRequest()
              {
                  using (new MethodLogger(s_logger))
                  {
                      try
      Severity: Major
      Found in src/libfintx.EBICS/Commands/CddCommand.cs and 1 other location - About 1 day to fix
      src/libfintx.EBICS/Commands/CctCommand.cs on lines 313..416

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

      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

              private (XmlDocument request, IList<string> segments) CreateInitRequest()
              {
                  using (new MethodLogger(s_logger))
                  {
                      try
      Severity: Major
      Found in src/libfintx.EBICS/Commands/CctCommand.cs and 1 other location - About 1 day to fix
      src/libfintx.EBICS/Commands/CddCommand.cs on lines 327..430

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

      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

      Method Init_HKCAZ has 286 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public static async Task<String> Init_HKCAZ(FinTsClient client, string FromDate, string ToDate,
                  string Startpoint, CamtVersion camtVers)
              {
                  string segments = string.Empty;
                  var connectionDetails = client.ConnectionDetails;
      Severity: Major
      Found in src/libfintx.FinTS/Segments/HKCAZ.cs - About 1 day to fix

        File MainForm.Designer.cs has 620 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        namespace libfintx.Sample.Ui
        {
            partial class MainForm
            {
                /// <summary>
        Severity: Major
        Found in src/libfintx.Sample.Ui/MainForm.Designer.cs - About 1 day to fix

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

                      {
                          SEG sEG = new SEG();
                          var sb = new StringBuilder();
                          sb.Append("HKIDN");
                          sb.Append(DEG.Separator);
          Severity: Major
          Found in src/libfintx.FinTS/Segments/HKSYN.cs and 1 other location - About 1 day to fix
          src/libfintx.FinTS/Segments/HKSYN.cs on lines 99..151

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

          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

                      {
                          SEG sEG = new SEG();
                          var sb = new StringBuilder();
                          sb.Append("HKIDN");
                          sb.Append(DEG.Separator);
          Severity: Major
          Found in src/libfintx.FinTS/Segments/HKSYN.cs and 1 other location - About 1 day to fix
          src/libfintx.FinTS/Segments/HKSYN.cs on lines 45..97

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

          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

          File AccountPermission.cs has 572 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          namespace libfintx.FinTS
          {
              public class AccountPermission
              {
                  public string Segment { get; set; }
          Severity: Major
          Found in src/libfintx.FinTS/Data/AccountPermission.cs - About 1 day to fix

            Method Init_HKKAZ has 241 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public static async Task<String> Init_HKKAZ(FinTsClient client, string FromDate, string ToDate, string Startpoint)
                    {
                        Log.Write("Starting job HKKAZ: Request transactions");
            
                        SEG sEG = new SEG();
            Severity: Major
            Found in src/libfintx.FinTS/Segments/HKKAZ.cs - About 1 day to fix

              Method Init_INI has 235 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static async Task<String> Init_INI(FinTsClient client, string hkTanSegmentId = null)
                      {
                          SEG sEG = new SEG();
                          StringBuilder sb = new StringBuilder();
              
              
              Severity: Major
              Found in src/libfintx.FinTS/Transactions/INI.cs - About 1 day to fix

                File MainForm.cs has 547 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using libfintx.FinTS;
                using libfintx.FinTS.Camt;
                using libfintx.FinTS.Data;
                using libfintx.FinTSConfig;
                using libfintx.Globals;
                Severity: Major
                Found in src/libfintx.Sample.Ui/MainForm.cs - About 1 day to fix

                  File Helper.cs has 538 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  using System;
                  using System.Collections.Generic;
                  using System.IO;
                  using System.Linq;
                  using System.Text;
                  Severity: Major
                  Found in src/libfintx.FinTS/Helper/Helper.cs - About 1 day to fix

                    Method Serialize has a Cognitive Complexity of 68 (exceeds 20 allowed). Consider refactoring.
                    Open

                            public static List<SwiftStatement> Serialize(string STA, string account = null, bool writeToFile = false, bool pending = false)
                            {
                                if (writeToFile)
                                {
                                    if (account == null)
                    Severity: Minor
                    Found in src/libfintx.FinTS/MT940/MT940.cs - About 1 day 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

                    Severity
                    Category
                    Status
                    Source
                    Language