mrklintscher/libfintx

View on GitHub

Showing 466 of 466 total issues

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

namespace libfintx.FinTS.Camt.Camt053
{
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
    [System.SerializableAttribute()]
src/libfintx.FinTS/Camt/Camt052/camt_052_001_02/camt_052_001_02.cs on lines 14..8355

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

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

namespace libfintx.FinTS.Camt.Camt052_002
{
    /// <remarks/>
    [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
    [System.SerializableAttribute()]
src/libfintx.FinTS/Camt/Camt053/camt_053_001_02/camt_053_001_02.cs on lines 14..8355

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

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 GetBankList has 4831 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        public static List<Bank> GetBankList()
        {
            return new List<Bank>()
            {
                new Bank("48020086", "70020270", "HYVEDEMM344", "https://hbci-01.hypovereinsbank.de/bank/hbci"),
Severity: Major
Found in src/libfintx.Sample.Ui/Bank.cs - About 3 wks to fix

    File camt_052_001_08.cs has 8201 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    namespace libfintx.FinTS.Camt.Camt052_008 {
        using System.Xml.Serialization;
        
        
        /// <remarks/>
    Severity: Major
    Found in src/libfintx.FinTS/Camt/Camt052/camt_052_001_08/camt_052_001_08.cs - About 3 wks to fix

      File camt_053_001_02.cs has 6520 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      namespace libfintx.FinTS.Camt.Camt053
      {
          /// <remarks/>
          [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
          [System.SerializableAttribute()]
      Severity: Major
      Found in src/libfintx.FinTS/Camt/Camt053/camt_053_001_02/camt_053_001_02.cs - About 2 wks to fix

        File camt_052_001_02.cs has 6520 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        namespace libfintx.FinTS.Camt.Camt052_002
        {
            /// <remarks/>
            [System.CodeDom.Compiler.GeneratedCodeAttribute("xsd", "4.8.3928.0")]
            [System.SerializableAttribute()]
        Severity: Major
        Found in src/libfintx.FinTS/Camt/Camt052/camt_052_001_02/camt_052_001_02.cs - About 2 wks to fix

          File Bank.cs has 4850 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System.Collections.Generic;
          
          namespace libfintx.Sample.Ui
          {
              public class Bank
          Severity: Major
          Found in src/libfintx.Sample.Ui/Bank.cs - About 2 wks to fix

            File pain_001_001_03.cs has 3266 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            namespace libfintx.Sepa.pain_001_001_03 {
                using System.Xml.Serialization;
                
                
                /// <remarks/>
            Severity: Major
            Found in src/libfintx.Sepa/Pain/pain_001_001_03/pain_001_001_03.cs - About 1 wk to fix

              Method Parse_Segments has a Cognitive Complexity of 218 (exceeds 20 allowed). Consider refactoring.
              Open

                      public static List<HBCIBankMessage> Parse_Segments(FinTsClient client, string Message)
                      {
                          Log.Write("Parsing segments ...");
              
                          try
              Severity: Minor
              Found in src/libfintx.FinTS/Helper/Helper.cs - About 4 days 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

              Method Data has a Cognitive Complexity of 203 (exceeds 20 allowed). Consider refactoring.
              Open

                      private static void Data(string swiftTag, string swiftData)
                      {
                          if (SWIFTStatement != null)
                          {
                              SWIFTStatement.Lines.Add(new SwiftLine(swiftTag, swiftData));
              Severity: Minor
              Found in src/libfintx.FinTS/MT940/MT940.cs - About 3 days 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

              Method Create has 635 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public static string Create(FinTsClient client, int MsgNum, string DialogID, string Segments, string HIRMS_TAN, string SystemID = null)
                      {
              
                          int Version = client.ConnectionDetails.HbciVersion;
                          int BLZ = client.ConnectionDetails.BlzPrimary;
              Severity: Major
              Found in src/libfintx.FinTS/Message/FinTsMessage.cs - About 3 days to fix

                Method InitializeComponent has 543 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void InitializeComponent()
                        {
                            this.txt_hbci_meldung = new System.Windows.Forms.TextBox();
                            this.btn_auftrag_bestätigen_tan = new System.Windows.Forms.Button();
                            this.btn_überweisen = new System.Windows.Forms.Button();
                Severity: Major
                Found in src/libfintx.Sample.Ui/MainForm.Designer.cs - About 2 days to fix

                  Method ProcessDocument has a Cognitive Complexity of 148 (exceeds 20 allowed). Consider refactoring.
                  Open

                          private void ProcessDocument(Camt052_008.Document document)
                          {
                              statements = new List<CamtStatement>();
                  
                              var stmts = document.BkToCstmrAcctRpt.Rpt;
                  Severity: Minor
                  Found in src/libfintx.FinTS/Camt/Camt052/Camt052Parser.cs - About 2 days 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

                  Method Permission has 538 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public static string Permission(string segment)
                          {
                              string result = null;
                  
                              switch (segment)
                  Severity: Major
                  Found in src/libfintx.FinTS/Data/AccountPermission.cs - About 2 days to fix

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

                    using System;
                    using System.Collections.Generic;
                    using System.Security;
                    using libfintx.Globals;
                    using libfintx.Sepa.Helper;
                    Severity: Major
                    Found in src/libfintx.Sepa/Pain/pain00100303.cs and 1 other location - About 2 days to fix
                    src/libfintx.Sepa/Pain/pain00100103.cs on lines 24..233

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

                    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

                    using System;
                    using System.Collections.Generic;
                    using System.Security;
                    using libfintx.Globals;
                    
                    
                    Severity: Major
                    Found in src/libfintx.Sepa/Pain/pain00100103.cs and 1 other location - About 2 days to fix
                    src/libfintx.Sepa/Pain/pain00100303.cs on lines 24..234

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

                    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 ProcessDocument has a Cognitive Complexity of 121 (exceeds 20 allowed). Consider refactoring.
                    Open

                            private void ProcessDocument(Camt052_002.Document document)
                            {
                                statements = new List<CamtStatement>();
                    
                                var stmts = document.BkToCstmrAcctRpt.Rpt;
                    Severity: Minor
                    Found in src/libfintx.FinTS/Camt/Camt052/Camt052Parser.cs - About 2 days 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

                    Method ProcessDocument has a Cognitive Complexity of 121 (exceeds 20 allowed). Consider refactoring.
                    Open

                            private void ProcessDocument(Document document)
                            {
                                statements = new List<CamtStatement>();
                    
                                AccountStatement2[] stmts = document.BkToCstmrStmt.Stmt;
                    Severity: Minor
                    Found in src/libfintx.FinTS/Camt/Camt053/Camt053Parser.cs - About 2 days 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

                    Method Data has 389 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private static void Data(string swiftTag, string swiftData)
                            {
                                if (SWIFTStatement != null)
                                {
                                    SWIFTStatement.Lines.Add(new SwiftLine(swiftTag, swiftData));
                    Severity: Major
                    Found in src/libfintx.FinTS/MT940/MT940.cs - About 1 day to fix

                      File FinTsMessage.cs has 732 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      using System;
                      using System.IO;
                      using System.Net;
                      using System.Text;
                      using System.Threading.Tasks;
                      Severity: Major
                      Found in src/libfintx.FinTS/Message/FinTsMessage.cs - About 1 day to fix
                        Severity
                        Category
                        Status
                        Source
                        Language