Badgerati/NotifyMeCI

View on GitHub

Showing 50 of 50 total issues

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

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
            this.menuStrip1 = new System.Windows.Forms.MenuStrip();
Severity: Major
Found in NotifyMeCI.GUI/Form1.Designer.cs - About 1 day to fix

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

            private void InitializeComponent()
            {
                System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(EditServerForm));
                this.label1 = new System.Windows.Forms.Label();
                this.ServerTypeDdl = new System.Windows.Forms.ComboBox();
    Severity: Major
    Found in NotifyMeCI.GUI/EditServerForm.Designer.cs - About 6 hrs to fix

      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

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

        namespace NotifyMeCI.GUI
        {
            partial class Form1
            {
                /// <summary>
        Severity: Minor
        Found in NotifyMeCI.GUI/Form1.Designer.cs - About 4 hrs to fix

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

                  private void InitializeComponent()
                  {
                      System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
                      this.CancelBtn = new System.Windows.Forms.Button();
                      this.OkBtn = new System.Windows.Forms.Button();
          Severity: Major
          Found in NotifyMeCI.GUI/SettingsForm.Designer.cs - About 3 hrs to fix

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

                    public IList<BuildStatus> UpdateMany(IList<BuildStatus> buildStatuses)
                    {
                        var now = DateTime.Now;
                        buildStatuses.ToList().ForEach(x => x.LastUpdated = now);
            
            
            Severity: Major
            Found in NotifyMeCI.Engine/Repositories/BuildStatusRepository.cs and 1 other location - About 3 hrs to fix
            NotifyMeCI.Engine/Repositories/SettingRepository.cs on lines 35..48

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

            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 IList<Setting> UpdateMany(IList<Setting> settings)
                    {
                        var now = DateTime.Now;
                        settings.ToList().ForEach(x => x.LastUpdated = now);
            
            
            Severity: Major
            Found in NotifyMeCI.Engine/Repositories/SettingRepository.cs and 1 other location - About 3 hrs to fix
            NotifyMeCI.Engine/Repositories/BuildStatusRepository.cs on lines 36..49

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

            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

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

                      public static string ValidateServerValues(string serverType, string name, string url, int poll, string apiToken, bool uniqueName = true)
                      {
                          try
                          {
                              // check server type
              Severity: Minor
              Found in NotifyMeCI.GUI/Validator.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

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

                    using System.Reflection;
                    using System.Runtime.CompilerServices;
                    using System.Runtime.InteropServices;
                    
                    // General Information about an assembly is controlled through the following 
                    Severity: Major
                    Found in NotifyMeCI.Engine/Properties/AssemblyInfo.cs and 2 other locations - About 1 hr to fix
                    NotifyMeCI.GUI/Properties/AssemblyInfo.cs on lines 1..37
                    NotifyMeCI.Injector/Properties/AssemblyInfo.cs on lines 1..37

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

                    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

                    using System.Reflection;
                    using System.Runtime.CompilerServices;
                    using System.Runtime.InteropServices;
                    
                    // General Information about an assembly is controlled through the following 
                    Severity: Major
                    Found in NotifyMeCI.GUI/Properties/AssemblyInfo.cs and 2 other locations - About 1 hr to fix
                    NotifyMeCI.Engine/Properties/AssemblyInfo.cs on lines 1..37
                    NotifyMeCI.Injector/Properties/AssemblyInfo.cs on lines 1..37

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

                    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

                    using System.Reflection;
                    using System.Runtime.CompilerServices;
                    using System.Runtime.InteropServices;
                    
                    // General Information about an assembly is controlled through the following 
                    Severity: Major
                    Found in NotifyMeCI.Injector/Properties/AssemblyInfo.cs and 2 other locations - About 1 hr to fix
                    NotifyMeCI.Engine/Properties/AssemblyInfo.cs on lines 1..37
                    NotifyMeCI.GUI/Properties/AssemblyInfo.cs on lines 1..37

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

                    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 JArray GetJson(string url, string token)
                            {
                                var _request = GetRequest(url, token);
                                var _jobsJson = default(JArray);
                    
                    
                    Severity: Major
                    Found in NotifyMeCI.Engine/Servers/AppVeyorCIServer.cs and 1 other location - About 1 hr to fix
                    NotifyMeCI.Engine/Servers/JenkinsCIServer.cs on lines 152..169

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

                    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 JObject GetJson(string url, string token)
                            {
                                var _request = GetRequest(url, token);
                                var _jobsJson = default(JObject);
                    
                    
                    Severity: Major
                    Found in NotifyMeCI.Engine/Servers/JenkinsCIServer.cs and 1 other location - About 1 hr to fix
                    NotifyMeCI.Engine/Servers/AppVeyorCIServer.cs on lines 126..143

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

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

                              public void CoreLogic()
                              {
                                  // get all the servers that need updating
                                  var servers = IsFirstRun
                                      ? CIServerRepository.All()
                      Severity: Minor
                      Found in NotifyMeCI.Engine/Tasks/JobTask.cs - About 1 hr to fix

                        Method SetupBuildStatusTable has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private void SetupBuildStatusTable()
                                {
                                    // get all status enum values
                                    var statuses = Enum.GetNames(typeof(BuildStatusType));
                                    var rows = statuses.Length + 1;
                        Severity: Minor
                        Found in NotifyMeCI.GUI/SettingsForm.cs - About 1 hr to fix

                          Method UpdateJob has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private CIJob UpdateJob(CIJob job, string token)
                                  {
                                      if (job == default(CIJob))
                                      {
                                          return job;
                          Severity: Minor
                          Found in NotifyMeCI.Engine/Servers/JenkinsCIServer.cs - About 1 hr to fix
                            Severity
                            Category
                            Status
                            Source
                            Language