onebeyond/onebeyond-studio-obelisk

View on GitHub

Showing 27 of 103 total issues

Method BuildTargetModel has 345 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        protected override void BuildTargetModel(ModelBuilder modelBuilder)
        {
#pragma warning disable 612, 618
            modelBuilder
                .HasAnnotation("ProductVersion", "6.0.4")

    Method BuildModel has 345 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            protected override void BuildModel(ModelBuilder modelBuilder)
            {
    #pragma warning disable 612, 618
                modelBuilder
                    .HasAnnotation("ProductVersion", "6.0.4")

      Method Up has 280 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          protected override void Up(MigrationBuilder migrationBuilder)
          {
              migrationBuilder.CreateTable(
                  name: "AspNetRoles",
                  columns: table => new

        File 20220420161435_Initialize_Database.Designer.cs has 363 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        using System;
        using Microsoft.EntityFrameworkCore;
        using Microsoft.EntityFrameworkCore.Infrastructure;
        using Microsoft.EntityFrameworkCore.Metadata;
        using Microsoft.EntityFrameworkCore.Migrations;

          File DomainContextModelSnapshot.cs has 360 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          using System;
          using Microsoft.EntityFrameworkCore;
          using Microsoft.EntityFrameworkCore.Infrastructure;
          using Microsoft.EntityFrameworkCore.Metadata;
          using Microsoft.EntityFrameworkCore.Storage.ValueConversion;

            Method ConfigureServices has 107 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private static void ConfigureServices(HostBuilderContext hostBuilderContext, IServiceCollection services)
                {
                    var configuration = hostBuilderContext.Configuration;
                    var environment = hostBuilderContext.HostingEnvironment;
            
            
            Severity: Major
            Found in src/OneBeyond.Studio.Obelisk.WebApi/Program.cs - About 4 hrs to fix

              File Program.cs has 320 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              using System;
              using System.IO;
              using System.Linq;
              using System.Reflection;
              using System.Threading;
              Severity: Minor
              Found in src/OneBeyond.Studio.Obelisk.WebApi/Program.cs - About 3 hrs to fix

                File 20220420161435_Initialize_Database.cs has 315 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                using System;
                using Microsoft.EntityFrameworkCore.Migrations;
                
                #nullable disable
                
                

                  Method AddApplicationAuthentication has 65 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      public static IdentityBuilder AddApplicationAuthentication(
                          this IServiceCollection services,
                          IHostEnvironment hostEnvironment,
                          IConfiguration configuration)
                      {

                    Method ConfigureMiddleware has 64 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        private static void ConfigureMiddleware(
                            IApplicationBuilder app,
                            IServiceProvider services,
                            IConfiguration configuration)
                        {
                    Severity: Major
                    Found in src/OneBeyond.Studio.Obelisk.WebApi/Program.cs - About 2 hrs to fix

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

                          public SecurityHeadersBuilder AddSecurityPolicyFromConfiguration(
                              IConfigurationSection securityHeaders)
                          {
                              EnsureArg.IsNotNull(securityHeaders, nameof(securityHeaders));
                      
                      

                        Method SignInAsync has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            protected override async Task<Domain.SignInResult> SignInAsync(
                                SignInViaPassword command,
                                AuthUser authUser,
                                CancellationToken cancellationToken)
                            {

                          Method Handle has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              public async Task<JwtToken> Handle(SignInJwtToken command, CancellationToken cancellationToken)
                              {
                                  EnsureArg.IsNotNull(command, nameof(command));
                          
                                  var identityUser = await _userManager.FindByNameAsync(command.Username).ConfigureAwait(false)

                            Method Handle has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                public async Task<Domain.SignInResult> Handle(
                                    TSignIn command,
                                    CancellationToken cancellationToken)
                                {
                                    EnsureArg.IsNotNull(command, nameof(command));

                              Method HandleDomainException has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  private static async Task HandleDomainException(HttpContext httpContext, Func<Task> next)
                                  {
                                      try
                                      {
                                          await next();

                                Method Handle has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    public async Task<ResetPasswordToken> Handle(CreateLogin command, CancellationToken cancellationToken)
                                    {
                                        EnsureArg.IsNotNull(command, nameof(command));
                                
                                        var identityUser = new AuthUser

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

                                      public override async Task ValidatePrincipal(CookieValidatePrincipalContext context)
                                      {
                                          var loginId = context.Principal?.Identity?.TryGetLoginId() ?? string.Empty;
                                  
                                          if (loginId.IsNullOrWhiteSpace())

                                    Method Main has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        public static async Task Main(string[] args)
                                        {
                                            // Logger used during app bootstrap
                                            Log.Logger = new LoggerConfiguration()
                                                .WriteTo.Console()
                                    Severity: Minor
                                    Found in src/OneBeyond.Studio.Obelisk.WebApi/Program.cs - About 1 hr to fix

                                      Method ProcessContollerActionParameter has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          private static bool ProcessContollerActionParameter(
                                              OpenApiOperation operation, 
                                              OperationFilterContext context, 
                                              ParameterInfo parameter)
                                          {

                                        Method RunAsync has 28 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            [Function(nameof(DomainEventProcessor))]
                                            public async Task RunAsync(
                                                [QueueTrigger(
                                                    $"%{QueueName}%",
                                                    Connection = QueueConnection)]
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language