alibaba/noform

View on GitHub

Showing 217 of 217 total issues

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

const expandIconDefault = <svg viewBox="0 0 1024 1024" focusable="false" data-icon="caret-down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path></svg>
Severity: Major
Found in packages/antd-components/src/components/ToggleTrigger.tsx and 5 other locations - About 1 hr to fix
packages/antd-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/next-components/src/components/Sorter.tsx on lines 6..6
packages/next-components/src/components/Sorter.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 8..8

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

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

const expandIconDefault = <svg viewBox="0 0 1024 1024" focusable="false" data-icon="caret-down" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"></path></svg>
Severity: Major
Found in packages/next-components/src/components/ToggleTrigger.tsx and 5 other locations - About 1 hr to fix
packages/antd-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/antd-components/src/components/ToggleTrigger.tsx on lines 8..8
packages/next-components/src/components/Sorter.tsx on lines 6..6
packages/next-components/src/components/Sorter.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 7..7

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

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

const unExpandIconDefault = <svg viewBox="0 0 1024 1024" focusable="false" data-icon="caret-up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path></svg>
Severity: Major
Found in packages/next-components/src/components/ToggleTrigger.tsx and 5 other locations - About 1 hr to fix
packages/antd-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/antd-components/src/components/ToggleTrigger.tsx on lines 8..8
packages/next-components/src/components/Sorter.tsx on lines 6..6
packages/next-components/src/components/Sorter.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 8..8

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

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

const defaultAscIcon = <svg viewBox="0 0 1024 1024" focusable="false" data-icon="caret-up" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"></path></svg>
Severity: Major
Found in packages/next-components/src/components/Sorter.tsx and 5 other locations - About 1 hr to fix
packages/antd-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/antd-components/src/components/ToggleTrigger.tsx on lines 8..8
packages/next-components/src/components/Sorter.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 7..7
packages/next-components/src/components/ToggleTrigger.tsx on lines 8..8

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

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

registerFormField(
  'preview',
  connect({
    getProps: (props: any, fieldProps) => {
      const { content } = fieldProps.props || {}
Severity: Major
Found in packages/next/src/fields/index.tsx and 1 other location - About 1 hr to fix
packages/antd/src/fields/index.tsx on lines 59..67

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

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

registerFormField(
  'preview',
  connect({
    getProps: (props: any, fieldProps) => {
      const { content } = fieldProps.props || {}
Severity: Major
Found in packages/antd/src/fields/index.tsx and 1 other location - About 1 hr to fix
packages/next/src/fields/index.tsx on lines 65..73

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

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

Function InternalTable has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
Open

const InternalTable: InternalTableType = props => {
    const { onSort = noop, onFilter = noop, ...others } = props
    const columns = React.Children.map(props.children, (item: any) => {
        if (!item) return item
        /* 处理嵌套类的情况 */
Severity: Minor
Found in packages/next-components/src/components/Table.tsx - 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 renderSchema has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const renderSchema = (props, contextProps) => {
  const { effects, actions, funcRegistry, componentsRegistry } = contextProps
  const { children, componentName, props: componentProps } = props

  const schemaResult = {
Severity: Minor
Found in packages/react-schema-renderer/src/index.tsx - About 1 hr to fix

    Function useExpand has 36 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const useExpand = (props: IConsumerProps) => {
        const { form } = props
        const list = useContext(ListContext)
        const formInstance = form || list.getFilterInstance()
        const forceUpdate = useForceUpdate()
    Severity: Minor
    Found in packages/react/src/hooks/useExpand.ts - About 1 hr to fix

      Function MultipleProvider has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      const MultipleProvider: React.FC<any> = (props = {}) => {
          const { children, hideWhen } = props
          const { list, id, pageSize } = useMultipleProvider(props)
      
          let element
      Severity: Minor
      Found in packages/react/src/components/MultipleProvider.tsx - 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 computeColumnProps has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      const computeColumnProps = (itemProps, opts) => {
          const cloneProps = { ...(itemProps || {}) }
          const { onSort } = opts || {}
          const { title, dataIndex, alignHeader, align } = cloneProps
          if (itemProps.sortable) {
      Severity: Minor
      Found in packages/next-components/src/components/Table.tsx - 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 useAntdList has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
      Open

      const useAntdList = (props: ITableProps = {}): ITableHook => {
          const actionsRef = useRef<any>(null)
          const reuseList = useContext(ListContext)
          actionsRef.current = actionsRef.current || props.actions || reuseList || createAntdListActions()
      
      
      Severity: Minor
      Found in packages/antd/src/hooks/useAntdList.ts - 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

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

          useEffect(() => {
              if (list) {
                  const id = list.subscribe(ListLifeCycleTypes.ON_LIST_LOADING_REFRESH, refresh)
                  return function cleanup () {
                      list.unSubscribe(id)
      Severity: Major
      Found in packages/react/src/hooks/useLoading.ts and 4 other locations - About 1 hr to fix
      packages/react/src/hooks/useConsumer.ts on lines 44..51
      packages/react/src/hooks/useMutlipleProvider.ts on lines 20..27
      packages/react/src/hooks/useTable.ts on lines 60..67
      packages/react/src/hooks/useToggle.ts on lines 132..139

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

          useEffect(() => {
              if (list) {
                  const id = list.subscribe(ListLifeCycleTypes.ON_LIST_TABLE_REFRESH, refresh)
                  return function cleanup () {
                      list.unSubscribe(id)
      Severity: Major
      Found in packages/react/src/hooks/useToggle.ts and 4 other locations - About 1 hr to fix
      packages/react/src/hooks/useConsumer.ts on lines 44..51
      packages/react/src/hooks/useLoading.ts on lines 32..39
      packages/react/src/hooks/useMutlipleProvider.ts on lines 20..27
      packages/react/src/hooks/useTable.ts on lines 60..67

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

          useEffect(() => {
              if (list) {
                  const id = list.subscribe(ListLifeCycleTypes.ON_LIST_TABLE_REFRESH, refresh)
                  return function cleanup () {
                      list.unSubscribe(id)
      Severity: Major
      Found in packages/react/src/hooks/useTable.ts and 4 other locations - About 1 hr to fix
      packages/react/src/hooks/useConsumer.ts on lines 44..51
      packages/react/src/hooks/useLoading.ts on lines 32..39
      packages/react/src/hooks/useMutlipleProvider.ts on lines 20..27
      packages/react/src/hooks/useToggle.ts on lines 132..139

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

          useEffect(() => {
              if (list) {
                  const id = list.subscribe(ListLifeCycleTypes.LIST_LIFECYCLES_GOD_MODE, eventHandler)
                  return function cleanup() {
                      list.unSubscribe(id)
      Severity: Major
      Found in packages/react/src/hooks/useConsumer.ts and 4 other locations - About 1 hr to fix
      packages/react/src/hooks/useLoading.ts on lines 32..39
      packages/react/src/hooks/useMutlipleProvider.ts on lines 20..27
      packages/react/src/hooks/useTable.ts on lines 60..67
      packages/react/src/hooks/useToggle.ts on lines 132..139

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

          useEffect(() => {
              if (list) {
                  const id = list.subscribe(ListLifeCycleTypes.ON_LIST_MULTIPLE_REFRESH, refresh)
                  return function cleanup() {
                      list.unSubscribe(id)
      Severity: Major
      Found in packages/react/src/hooks/useMutlipleProvider.ts and 4 other locations - About 1 hr to fix
      packages/react/src/hooks/useConsumer.ts on lines 44..51
      packages/react/src/hooks/useLoading.ts on lines 32..39
      packages/react/src/hooks/useTable.ts on lines 60..67
      packages/react/src/hooks/useToggle.ts on lines 132..139

      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

      Function useExpandContainer has 33 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const useExpandContainer = (props: IExpandProps) => {
          const list = useContext(ListContext)
          const { targetPath, form, schema } = props
          const componentProps = schema.getExtendsComponentProps()
          const { expandStatus: propExpandStatus } = componentProps
      Severity: Minor
      Found in packages/react/src/hooks/useExpandContainer.ts - About 1 hr to fix

        Function initSyncFilterData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          const initSyncFilterData = (executeNow = false) => {
            // 同步params到搜索区域上
            const syncFilterData = {}
            Object.keys(params || {}).forEach(paramField => {
              if (
        Severity: Minor
        Found in packages/core/src/index.ts - About 1 hr to fix

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

          export const setSelectionsByInstance = (instance, ids, records) => {
            const targetInstance = instance.actions ? instance.actions : instance
            targetInstance.setRowSelection({
              ids,
              records
          Severity: Major
          Found in packages/antd-components/src/shared.ts and 1 other location - About 1 hr to fix
          packages/next-components/src/shared.ts on lines 32..38

          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

          Severity
          Category
          Status
          Source
          Language