ory-am/hydra

View on GitHub
persistence/sql/persister_nid_test.go

Summary

Maintainability
F
2 wks
Test Coverage

File persister_nid_test.go has 1893 lines of code (exceeds 500 allowed). Consider refactoring.
Open

// Copyright © 2022 Ory Corp
// SPDX-License-Identifier: Apache-2.0

package sql_test

Severity: Major
Found in persistence/sql/persister_nid_test.go - About 4 days to fix

    PersisterTestSuite has 84 methods (exceeds 20 allowed). Consider refactoring.
    Open

    type PersisterTestSuite struct {
        suite.Suite
        registries map[string]driver.Registry
        t1         context.Context
        t2         context.Context
    Severity: Major
    Found in persistence/sql/persister_nid_test.go - About 1 day to fix

      Method PersisterTestSuite.TestListUserAuthenticatedClientsWithBackChannelLogout has 71 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithBackChannelLogout() {
          t := s.T()
          for k, r := range s.registries {
              t.Run(k, func(t *testing.T) {
                  c1 := &client.Client{ID: "client-1", BackChannelLogoutURI: "not-null"}
      Severity: Minor
      Found in persistence/sql/persister_nid_test.go - About 1 hr to fix

        Method PersisterTestSuite.TestListUserAuthenticatedClientsWithFrontChannelLogout has 71 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithFrontChannelLogout() {
            t := s.T()
            for k, r := range s.registries {
                t.Run(k, func(t *testing.T) {
                    c1 := &client.Client{ID: "client-1", FrontChannelLogoutURI: "not-null"}
        Severity: Minor
        Found in persistence/sql/persister_nid_test.go - About 1 hr to fix

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

          func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithFrontChannelLogout() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      c1 := &client.Client{ID: "client-1", FrontChannelLogoutURI: "not-null"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 2 days to fix
          persistence/sql/persister_nid_test.go on lines 1512..1593

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

          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

          func (s *PersisterTestSuite) TestListUserAuthenticatedClientsWithBackChannelLogout() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      c1 := &client.Client{ID: "client-1", BackChannelLogoutURI: "not-null"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 2 days to fix
          persistence/sql/persister_nid_test.go on lines 1595..1676

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

          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

          func (s *PersisterTestSuite) TestDeleteAccessTokens() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 6 hrs to fix
          persistence/sql/persister_nid_test.go on lines 1743..1764

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

          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

          func (s *PersisterTestSuite) TestRevokeAccessToken() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 6 hrs to fix
          persistence/sql/persister_nid_test.go on lines 584..605

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

          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

          func (s *PersisterTestSuite) TestDeleteRefreshTokenSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 670..692
          persistence/sql/persister_nid_test.go on lines 694..716

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

          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

          func (s *PersisterTestSuite) TestDeletePKCERequestSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 670..692
          persistence/sql/persister_nid_test.go on lines 718..740

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

          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

          func (s *PersisterTestSuite) TestDeleteOpenIDConnectSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 694..716
          persistence/sql/persister_nid_test.go on lines 718..740

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

          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

          func (s *PersisterTestSuite) TestGetOpenIDConnectSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 1285..1307
          persistence/sql/persister_nid_test.go on lines 1382..1404

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

          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

          func (s *PersisterTestSuite) TestGetRefreshTokenSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 1261..1283
          persistence/sql/persister_nid_test.go on lines 1285..1307

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

          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

          func (s *PersisterTestSuite) TestGetPKCERequestSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 2 other locations - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 1261..1283
          persistence/sql/persister_nid_test.go on lines 1382..1404

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

          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

          func (s *PersisterTestSuite) TestCreateRefreshTokenSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 500..520

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

          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

          func (s *PersisterTestSuite) TestCreatePKCERequestSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 522..541

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

          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

          func (s *PersisterTestSuite) TestGetAuthorizeCodeSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 948..968

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

          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

          func (s *PersisterTestSuite) TestGetAccessTokenSession() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      client := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 5 hrs to fix
          persistence/sql/persister_nid_test.go on lines 970..990

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

          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

          func (s *PersisterTestSuite) TestGetConcreteClient() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      expected := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 2 hrs to fix
          persistence/sql/persister_nid_test.go on lines 992..1007

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

          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

          func (s *PersisterTestSuite) TestGetClient() {
              t := s.T()
              for k, r := range s.registries {
                  t.Run(k, func(t *testing.T) {
                      expected := &client.Client{ID: "client-id"}
          Severity: Major
          Found in persistence/sql/persister_nid_test.go and 1 other location - About 2 hrs to fix
          persistence/sql/persister_nid_test.go on lines 1045..1060

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

          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