weareopensource/Swift

View on GitHub
waosSwift/modules/auth/controllers/AuthForgotController.swift

Summary

Maintainability
C
1 day
Test Coverage

Function bindState has 61 lines of code (exceeds 25 allowed). Consider refactoring.
Wontfix

    func bindState(_ reactor: AuthForgotReactor) {
        // refreshing
        reactor.state
            .map { $0.isRefreshing }
            .distinctUntilChanged()
Severity: Major
Found in waosSwift/modules/auth/controllers/AuthForgotController.swift - About 2 hrs to fix

    Function bindState has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Wontfix

        func bindState(_ reactor: AuthForgotReactor) {
            // refreshing
            reactor.state
                .map { $0.isRefreshing }
                .distinctUntilChanged()
    Severity: Minor
    Found in waosSwift/modules/auth/controllers/AuthForgotController.swift - 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

    Function setupConstraints has 33 lines of code (exceeds 25 allowed). Consider refactoring.
    Wontfix

        override func setupConstraints() {
            self.width = self.view.frame.width
            // errors
            labelErrors.snp.makeConstraints {  (make) -> Void in
                make.width.equalTo(300)
    Severity: Minor
    Found in waosSwift/modules/auth/controllers/AuthForgotController.swift - About 1 hr to fix

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

          func bindView(_ reactor: AuthForgotReactor) {
              // cancel
              self.barButtonClose.rx.tap
                  .subscribe(onNext: { [weak self] _ in
                      guard let `self` = self else { return }
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 186..207
      waosSwift/modules/tasks/controllers/TasksViewController.swift on lines 81..102
      waosSwift/modules/users/controllers/UserPreferenceController.swift on lines 75..96
      waosSwift/modules/users/controllers/UserViewController.swift on lines 198..219

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

      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

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

              reactor.state
                  .map { $0.errors.count }
                  .distinctUntilChanged()
                  .subscribe(onNext: { count in
                      if(count > 0) {
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 278..293

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

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

              Observable.combineLatest(
                  reactor.state
                      .map { $0.errors.count > 0 }
                      .distinctUntilChanged(),
                  reactor.state
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 294..305
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 347..358

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

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

              inputEmail.snp.makeConstraints { (make) -> Void in
                  make.width.equalTo(300)
                  make.height.equalTo(50)
                  make.centerX.equalTo(self.view)
                  make.centerY.equalTo(self.view).offset(-30).keyboard(false, in: self.view)
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 119..124
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 121..126

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

      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 11 locations. Consider refactoring.
      Open

              labelSuccess.snp.makeConstraints { (make) -> Void in
                  make.left.equalTo(25)
                  make.right.equalTo(-25)
                  make.centerX.equalTo(self.view)
                  make.bottom.equalTo(self.inputEmail.snp.top).offset(-10)
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 93..98
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 115..120
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 112..117
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 128..133
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 114..119
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 130..135
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 136..141
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 142..147
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 148..153
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 155..160

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

      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 11 locations. Consider refactoring.
      Open

              labelErrors.snp.makeConstraints {  (make) -> Void in
                  make.width.equalTo(300)
                  make.height.equalTo(50)
                  make.centerX.equalTo(self.view)
                  make.bottom.equalTo(self.inputEmail.snp.top).offset(-10)
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 100..105
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 115..120
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 112..117
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 128..133
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 114..119
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 130..135
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 136..141
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 142..147
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 148..153
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 155..160

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

      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 11 locations. Consider refactoring.
      Open

              buttonReset.snp.makeConstraints { (make) -> Void in
                  make.width.equalTo(300)
                  make.height.equalTo(50)
                  make.centerX.equalTo(self.view)
                  make.top.equalTo(self.inputEmail.snp.bottom).offset(10)
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 93..98
      waosSwift/modules/auth/controllers/AuthForgotController.swift on lines 100..105
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 112..117
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 128..133
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 114..119
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 130..135
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 136..141
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 142..147
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 148..153
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 155..160

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

      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

      Identical blocks of code found in 6 locations. Consider refactoring.
      Open

              reactor.state
                  .map { $0.isDismissed }
                  .distinctUntilChanged()
                  .filter { $0 }
                  .observe(on: MainScheduler.asyncInstance)
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 306..314
      waosSwift/modules/tasks/controllers/TasksViewController.swift on lines 131..139
      waosSwift/modules/users/controllers/UserMoreController.swift on lines 176..184
      waosSwift/modules/users/controllers/UserPreferenceController.swift on lines 129..137
      waosSwift/modules/users/controllers/UserViewController.swift on lines 435..443

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

      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 6 locations. Consider refactoring.
      Wontfix

              self.inputEmail.rx.controlEvent(.editingChanged).asObservable()
                  .debounce(.milliseconds(Metric.timesErrorsDebounce), scheduler: MainScheduler.instance)
                  .map {Reactor.Action.validateEmail}
                  .bind(to: reactor.action)
                  .disposed(by: self.disposeBag)
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 5 other locations - About 55 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 255..259
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 230..234
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 241..245
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 252..256
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 263..267

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

      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

      Identical blocks of code found in 3 locations. Consider refactoring.
      Wontfix

              self.backgroundImage.snp.makeConstraints { make in
                  make.top.equalTo(self.view)
                  make.centerX.equalTo(self.view)
                  make.width.height.equalTo(self.view.frame.height + self.width/5)
              }
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 2 other locations - About 55 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 164..168
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 162..166

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

      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 7 locations. Consider refactoring.
      Wontfix

              self.inputEmail.rx.text
                  .filter { ($0?.count)! > 0 }
                  .map {Reactor.Action.updateEmail($0!)}
                  .bind(to: reactor.action)
                  .disposed(by: self.disposeBag)
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 6 other locations - About 55 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 250..254
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 261..265
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 225..229
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 236..240
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 247..251
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 258..262

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

      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 4 locations. Consider refactoring.
      Wontfix

              buttonReset.rx.tap
                  .throttle(.milliseconds(Metric.timesButtonsThrottle), latest: false, scheduler: MainScheduler.instance)
                  .map { _ in Reactor.Action.reset }
                  .bind(to: reactor.action)
                  .disposed(by: self.disposeBag)
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 3 other locations - About 50 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 229..233
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 213..217
      waosSwift/modules/onBoarding/controllers/OnBoardingController.swift on lines 131..135

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

      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

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

          let inputEmail = CoreUITextField().then {
              $0.autocorrectionType = .no
              $0.placeholder = L10n.authMail + "..."
              $0.autocapitalizationType = .none
              $0.textContentType = .username
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 2 other locations - About 50 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 25..32
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 35..41

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

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

              inputEmail.snp.prepareConstraints { (make) -> Void in
                  make.centerY.equalTo(self.view).offset(-130).keyboard(true, in: self.view)
              }
      Severity: Major
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 2 other locations - About 40 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 125..127
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 127..129

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

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

          let buttonReset = CoreUIButton().then {
              $0.setTitle(L10n.authReset, for: .normal)
              $0.setTitleColor(Metric.secondary, for: .normal)
          }
      Severity: Minor
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 2 other locations - About 35 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 43..46
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 55..58

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

      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

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

          let backgroundImage = UIImageView().then {
              $0.contentMode = .scaleToFill
              $0.image = UIImage(named: "authBackground")
              $0.alpha = 0.4
          }
      Severity: Minor
      Found in waosSwift/modules/auth/controllers/AuthForgotController.swift and 2 other locations - About 35 mins to fix
      waosSwift/modules/auth/controllers/AuthSigninController.swift on lines 66..70
      waosSwift/modules/auth/controllers/AuthSignupController.swift on lines 66..70

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

      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

      There are no issues that match your filters.

      Category
      Status