Yuriy-Pelekh/GitTank

View on GitHub

Showing 27 of 27 total issues

File Annotations.cs has 508 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
// ReSharper disable InheritdocConsiderUsage
 
#pragma warning disable 1591
// ReSharper disable UnusedMember.Global
Severity: Major
Found in GitTank/Annotations.cs - About 1 day to fix

    File SettingsViewModel.cs has 329 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    using GitTank.Loggers;
    using GitTank.Models;
    using Microsoft.Toolkit.Mvvm.Input;
    using Newtonsoft.Json;
    using Newtonsoft.Json.Converters;
    Severity: Minor
    Found in GitTank/ViewModels/SettingsViewModel.cs - About 3 hrs to fix

      File MainViewModel.cs has 319 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      using Microsoft.Toolkit.Mvvm.Input;
      using System;
      using System.Collections.ObjectModel;
      using System.Linq;
      using System.Threading.Tasks;
      Severity: Minor
      Found in GitTank/ViewModels/MainViewModel.cs - About 3 hrs to fix

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

        public async Task Push()
        {
        // Requires: git config --global push.default current
        const string arguments = "push -u";
         
         
        Severity: Major
        Found in GitTank/GitProcessor.cs and 1 other location - About 3 hrs to fix
        GitTank/GitProcessor.cs on lines 283..303

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

        public async Task Fetch()
        {
        const string argument = "fetch -v --progress --prune \"origin\"";
         
        List<Task> runningTasks = new();
        Severity: Major
        Found in GitTank/GitProcessor.cs and 1 other location - About 3 hrs to fix
        GitTank/GitProcessor.cs on lines 230..251

        File GitProcessor.cs has 258 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using GitTank.Models;
        using System;
        using System.Collections.Generic;
        using System.IO;
        using System.Linq;
        Severity: Minor
        Found in GitTank/GitProcessor.cs - About 2 hrs to fix

          Method Execute has 34 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          public async Task<string> Execute(string command, string arguments)
          {
          _output.Clear();
          _jsonOutput.Clear();
          _result.Clear();
          Severity: Minor
          Found in GitTank/ProcessHelper.cs - About 1 hr to fix

            Method UpdateAllRepositories has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            private void UpdateAllRepositories(List<Sources> sources)
            {
            var defaultRepository = _settings.DefaultRepository;
            var defaultGitBranch = _settings.DefaultBranch;
            foreach (var item in sources)
            Severity: Minor
            Found in GitTank/ViewModels/SettingsViewModel.cs - About 1 hr to fix

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

              [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property)]
              public sealed class AspMvcActionAttribute : Attribute
              {
              public AspMvcActionAttribute() { }
               
               
              Severity: Minor
              Found in GitTank/Annotations.cs and 1 other location - About 45 mins to fix
              GitTank/Annotations.cs on lines 812..823

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

              [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property)]
              public sealed class AspMvcControllerAttribute : Attribute
              {
              public AspMvcControllerAttribute() { }
               
               
              Severity: Minor
              Found in GitTank/Annotations.cs and 1 other location - About 45 mins to fix
              GitTank/Annotations.cs on lines 775..786

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcAreaPartialViewLocationFormatAttribute : Attribute
              {
              public AspMvcAreaPartialViewLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 747..756
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcViewLocationFormatAttribute : Attribute
              {
              public AspMvcViewLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 747..756

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

              [AttributeUsage(
              AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.Field,
              AllowMultiple = true)]
              public sealed class ValueProviderAttribute : Attribute
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 747..756
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcMasterLocationFormatAttribute : Attribute
              {
              public AspMvcMasterLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 747..756
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcPartialViewLocationFormatAttribute : Attribute
              {
              public AspMvcPartialViewLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcAreaViewLocationFormatAttribute : Attribute
              {
              public AspMvcAreaViewLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 703..712
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 747..756
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = true)]
              public sealed class AspMvcAreaMasterLocationFormatAttribute : Attribute
              {
              public AspMvcAreaMasterLocationFormatAttribute([NotNull] string format)
              {
              Severity: Major
              Found in GitTank/Annotations.cs and 6 other locations - About 40 mins to fix
              GitTank/Annotations.cs on lines 163..174
              GitTank/Annotations.cs on lines 714..723
              GitTank/Annotations.cs on lines 725..734
              GitTank/Annotations.cs on lines 736..745
              GitTank/Annotations.cs on lines 747..756
              GitTank/Annotations.cs on lines 758..767

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

              [AttributeUsage(
              AttributeTargets.Method | AttributeTargets.Parameter | AttributeTargets.Property |
              AttributeTargets.Delegate | AttributeTargets.Field | AttributeTargets.Event |
              AttributeTargets.Class | AttributeTargets.Interface | AttributeTargets.GenericParameter)]
              public sealed class NotNullAttribute : Attribute { }
              Severity: Minor
              Found in GitTank/Annotations.cs and 1 other location - About 40 mins to fix
              GitTank/Annotations.cs on lines 48..52

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

              [Test]
              public void ConvertBackEmptyValueTest()
              {
              var relativePath = string.Empty;
              Assert.Throws<ArgumentException>(() => _target.ConvertBack(relativePath, typeof(string), null, CultureInfo.CurrentCulture));
              GitTank.Tests/ValueConverters/RelativeToFullPathValueConverterTest.cs on lines 32..37

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

              [Test]
              public void ConvertEmptyValueTest()
              {
              var relativePath = string.Empty;
              Assert.Throws<ArgumentException>(() => _target.Convert(relativePath, typeof(string), null, CultureInfo.CurrentCulture));
              GitTank.Tests/ValueConverters/RelativeToFullPathValueConverterTest.cs on lines 57..62
              Severity
              Category
              Status
              Source
              Language