Badgerati/NotifyMeCI

View on GitHub
NotifyMeCI.GUI/Form1.cs

Summary

Maintainability
D
1 day
Test Coverage

File Form1.cs has 401 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using NotifyMeCI.Engine.Enums;
using NotifyMeCI.Engine.Events;
using NotifyMeCI.Engine.Repositories.Interfaces;
using NotifyMeCI.Engine.Objects;
using NotifyMeCI.Injector;
Severity: Minor
Found in NotifyMeCI.GUI/Form1.cs - About 5 hrs to fix

    Class Form1 has 21 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public partial class Form1 : Form
        {
    
            #region Repositories
    
    
    Severity: Minor
    Found in NotifyMeCI.GUI/Form1.cs - About 2 hrs to fix

      Method UpdateJobsList has 46 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void UpdateJobsList(IList<CIJob> jobs)
              {
                  if (jobs == default(IList<CIJob>) || !jobs.Any())
                  {
                      return;
      Severity: Minor
      Found in NotifyMeCI.GUI/Form1.cs - About 1 hr to fix

        Method UpdateJobGui has 44 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private void UpdateJobGui(IList<CIJob> jobs)
                {
                    // Clear the current jobs list
                    if (JobListView.InvokeRequired)
                    {
        Severity: Minor
        Found in NotifyMeCI.GUI/Form1.cs - About 1 hr to fix

          Method AddServerBtn_Click has 40 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void AddServerBtn_Click(object sender, EventArgs e)
                  {
                      var errorTitle = "Error Adding New Server";
          
                      try
          Severity: Minor
          Found in NotifyMeCI.GUI/Form1.cs - About 1 hr to fix

            Method ServerTypeDdl_SelectedIndexChanged has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private void ServerTypeDdl_SelectedIndexChanged(object sender, EventArgs e)
                    {
                        var serverType = default(CIServerType);
            
                        var selectedItem = ServerTypeDdl.SelectedItem;
            Severity: Minor
            Found in NotifyMeCI.GUI/Form1.cs - About 1 hr to fix

              Method UpdateJobsList has a Cognitive Complexity of 25 (exceeds 20 allowed). Consider refactoring.
              Open

                      private void UpdateJobsList(IList<CIJob> jobs)
                      {
                          if (jobs == default(IList<CIJob>) || !jobs.Any())
                          {
                              return;
              Severity: Minor
              Found in NotifyMeCI.GUI/Form1.cs - 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

              There are no issues that match your filters.

              Category
              Status