BrainStation-23/recruitment-management-system

View on GitHub

Showing 16 of 70 total issues

File AccountController.cs has 348 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Web;
using System.Web.Mvc;

    Method Update has 73 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            public void Update(UserCreateModel model)
            {
                var entity = UserManager.FindById(model.Id);
    
                entity.UserName = model.Email;
    Severity: Major
    Found in Source/RecruitmentManagementSystem.Core/Services/UserService.cs - About 2 hrs to fix

      Method SeedInstitution has 68 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void SeedInstitution(ApplicationDbContext dbContext)
              {
                  var collection = new List<Institution>
                  {
                      new Institution
      Severity: Major
      Found in Source/RecruitmentManagementSystem.App/App_Start/SeedData.cs - About 2 hrs to fix

        Class AccountController has 22 methods (exceeds 20 allowed). Consider refactoring.
        Open

            [Authorize]
            public class AccountController : BaseController
            {
                private ApplicationSignInManager _signInManager;
                private ApplicationUserManager _userManager;

          Method ManageFiles has 52 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private static ICollection<File> ManageFiles(UserCreateModel model)
                  {
                      var files = new List<File>();
          
                      var httpFileCollection = HttpContext.Current.Request.Files;
          Severity: Major
          Found in Source/RecruitmentManagementSystem.Core/Services/UserService.cs - About 2 hrs to fix

            Function save has 42 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                        vm.save = function() {
                            vm.form.submitted = true;
            
                            if (vm.form.$valid) {
            
            

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

                      public static void RegisterBundles(BundleCollection bundles)
                      {
                          bundles.Add(new ScriptBundle("~/bundles/library").Include(
                              "~/node_modules/jquery/dist/jquery.js",
                              "~/node_modules/angular/angular.js",
              Severity: Minor
              Found in Source/RecruitmentManagementSystem.App/App_Start/BundleConfig.cs - About 1 hr to fix

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

                        public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context)
                        {
                            var manager = new ApplicationUserManager(new UserStore<User>(context.Get<ApplicationDbContext>()));
                            // Configure validation logic for usernames
                            manager.UserValidator = new UserValidator<User>(manager)

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

                          private ICollection<File> ManageFiles(QuestionModel model)
                          {
                              var files = new List<File>();
                              const FileType fileType = FileType.Document;
                              var fileCollection = HttpContext.Current.Request.Files;
                  Severity: Minor
                  Found in Source/RecruitmentManagementSystem.Core/Services/QuestionService.cs - About 1 hr to fix

                    Method Upload has 31 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            public static UploadConfig Upload(HttpPostedFile fileBase, FileType fileType)
                            {
                                //var fileName = $"{Guid.NewGuid()}.{Path.GetFileName(fileBase.FileName)}";
                                var fileName = String.Format("{0}{1}",Guid.NewGuid(),Path.GetFileName(fileBase.FileName));
                    
                    
                    Severity: Minor
                    Found in Source/RecruitmentManagementSystem.Core/Helpers/FileHelper.cs - About 1 hr to fix

                      Method SeedApplicationUser has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private static User SeedApplicationUser(DbContext dbContext)
                              {
                                  const string email = "admin-rms@bs-23.com";
                                  const string password = "HakunaMatata-23";
                      
                      
                      Severity: Minor
                      Found in Source/RecruitmentManagementSystem.App/App_Start/SeedData.cs - About 1 hr to fix

                        Function edit has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                    vm.edit = function () {
                                        vm.form.submitted = true;
                        
                                        var model = {
                                            id: vm.id,

                          Method ExecuteResult has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  public override void ExecuteResult(ControllerContext context)
                                  {
                                      if (context == null)
                                      {
                                          throw new ArgumentNullException(nameof(context));

                            Function create has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                        vm.create = function () {
                                            vm.form.submitted = true;
                            
                                            var model = {
                                                text: vm.text,

                              Function openQuestionModal has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                          vm.openQuestionModal = function(pageIndex) {
                                              var questionsInAllPages = [];
                              
                                              vm.pages.forEach(function(p) {
                                                  questionsInAllPages.push.apply(questionsInAllPages, p.quizQuestions);

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

                                        public async Task<ActionResult> Security(ManageMessageId? message)
                                        {
                                            ViewBag.StatusMessage =
                                                message == ManageMessageId.ChangePasswordSuccess
                                                    ? "Your password has been changed."
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language