glitch-soc/mastodon

View on GitHub

Showing 4,614 of 4,614 total issues

Function connectTimelineStream has 55 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const connectTimelineStream = (timelineId, channelName, params = {}, options = {}) => {
  const { messages } = getLocale();

  return connectStream(channelName, params, (dispatch, getState) => {
    const locale = getState().getIn(['meta', 'locale']);
Severity: Major
Found in app/javascript/flavours/glitch/actions/streaming.js - About 2 hrs to fix

    Function render has 55 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render () {
        const { status, intl, showReplyCount, withOpenButton } = this.props;
    
        const publicStatus  = ['public', 'unlisted'].includes(status.get('visibility'));
        const reblogPrivate = status.getIn(['account', 'id']) === me && status.get('visibility') === 'private';

      Function connectTimelineStream has 55 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const connectTimelineStream = (timelineId, channelName, params = {}, options = {}) => {
        const { messages } = getLocale();
      
        return connectStream(channelName, params, (dispatch, getState) => {
          const locale = getState().getIn(['meta', 'locale']);
      Severity: Major
      Found in app/javascript/mastodon/actions/streaming.js - About 2 hrs to fix

        Function render has 55 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          render () {
            const { intl } = this.props;
            const { value, expanded, options, selectedOption, error, isSubmitting } = this.state;
            const domain = (valueToDomain(value) || '').trim();
            const domainRegExp = new RegExp(`(${escapeRegExp(domain)})`, 'gi');
        Severity: Major
        Found in app/javascript/flavours/glitch/features/interaction_modal/index.jsx - About 2 hrs to fix

          Function render has 55 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render () {
              const { intl } = this.props;
              const { value, expanded, options, selectedOption, error, isSubmitting } = this.state;
              const domain = (valueToDomain(value) || '').trim();
              const domainRegExp = new RegExp(`(${escapeRegExp(domain)})`, 'gi');
          Severity: Major
          Found in app/javascript/mastodon/features/interaction_modal/index.jsx - About 2 hrs to fix

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

                    <button type='button' onClick={this.handleClick} data-index={6}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={6} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 107..107
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 108..108
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 109..109
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 110..110
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 111..111

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

            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

                    <button type='button' onClick={this.handleClick} data-index={2}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={2} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 107..107
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 109..109
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 110..110
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 111..111
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 112..112

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

            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

                    <button type='button' onClick={this.handleClick} data-index={4}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={4} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 107..107
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 108..108
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 109..109
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 111..111
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 112..112

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

            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

                    <button type='button' onClick={this.handleClick} data-index={1}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={1} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 108..108
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 109..109
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 110..110
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 111..111
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 112..112

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

            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

                    <button type='button' onClick={this.handleClick} data-index={3}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={3} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 107..107
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 108..108
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 110..110
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 111..111
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 112..112

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

            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

                    <button type='button' onClick={this.handleClick} data-index={5}><Emoji emoji='fist' set='twitter' size={22} sheetSize={32} skin={5} backgroundImageFn={backgroundImageFn} /></button>
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 107..107
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 108..108
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 109..109
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 110..110
            app/javascript/mastodon/features/compose/components/emoji_picker_dropdown.jsx on lines 112..112

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

            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

            export function hydrateCompose() {
              return (dispatch, getState) => {
                const me = getState().getIn(['meta', 'me']);
                const history = tagHistory.get(me);
            
            
            Severity: Major
            Found in app/javascript/flavours/glitch/actions/compose.js and 1 other location - About 2 hrs to fix
            app/javascript/mastodon/actions/compose.js on lines 673..682

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

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

              seekBy (time) {
                const currentTime = this.audio.currentTime + time;
            
                if (!isNaN(currentTime)) {
                  this.setState({ currentTime }, () => {
            Severity: Major
            Found in app/javascript/flavours/glitch/features/audio/index.jsx and 3 other locations - About 2 hrs to fix
            app/javascript/flavours/glitch/features/video/index.jsx on lines 274..282
            app/javascript/mastodon/features/audio/index.jsx on lines 427..435
            app/javascript/mastodon/features/video/index.jsx on lines 271..279

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

            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

            Select.propTypes = {
              label: PropTypes.node,
              value: PropTypes.any,
              onChange: PropTypes.func,
              options: PropTypes.arrayOf(PropTypes.shape({
            app/javascript/mastodon/features/compose/components/poll_form.jsx on lines 46..54

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

            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

              static propTypes = {
                onNextStep: PropTypes.func.isRequired,
                rules: ImmutablePropTypes.list,
                category: PropTypes.string,
                onChangeCategory: PropTypes.func.isRequired,
            Severity: Major
            Found in app/javascript/mastodon/features/report/category.jsx and 1 other location - About 2 hrs to fix
            app/javascript/flavours/glitch/features/report/category.jsx on lines 33..40

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

            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

              componentDidUpdate(prevProps) {
                if (this.props.singleColumn !== prevProps.singleColumn && !this.props.singleColumn) {
                  this.node.addEventListener('wheel', this.handleWheel, supportsPassiveEvents ? { passive: true } : false);
                }
              }
            app/javascript/mastodon/features/ui/components/columns_area.jsx on lines 96..100

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

            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

            export function hydrateCompose() {
              return (dispatch, getState) => {
                const me = getState().getIn(['meta', 'me']);
                const history = tagHistory.get(me);
            
            
            Severity: Major
            Found in app/javascript/mastodon/actions/compose.js and 1 other location - About 2 hrs to fix
            app/javascript/flavours/glitch/actions/compose.js on lines 705..714

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

            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

            export const updateConversations = conversation => dispatch => {
              dispatch(importFetchedAccounts(conversation.accounts));
            
              if (conversation.last_status) {
                dispatch(importFetchedStatus(conversation.last_status));
            Severity: Major
            Found in app/javascript/flavours/glitch/actions/conversations.js and 1 other location - About 2 hrs to fix
            app/javascript/mastodon/actions/conversations.js on lines 78..89

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

            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

            Select.propTypes = {
              label: PropTypes.node,
              value: PropTypes.any,
              onChange: PropTypes.func,
              options: PropTypes.arrayOf(PropTypes.shape({
            app/javascript/flavours/glitch/features/compose/components/poll_form.jsx on lines 47..55

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

            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

                  <ColumnHeader
                    icon='globe'
                    iconComponent={PublicIcon}
                    active={hasUnread}
                    title={intl.formatMessage(messages.title)}
            Severity: Major
            Found in app/javascript/flavours/glitch/features/firehose/index.jsx and 1 other location - About 2 hrs to fix
            app/javascript/mastodon/features/firehose/index.jsx on lines 164..174

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

            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