bufferapp/ui

View on GitHub
src/components/Icon/Icons/TextAlignLeft.tsx

Summary

Maintainability
A
55 mins
Test Coverage
A
100%

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

const TextAlignLeftIcon = createIconComponent({
  content: (
    <g>
      <path
        fillRule="evenodd"
Severity: Major
Found in src/components/Icon/Icons/TextAlignLeft.tsx and 79 other locations - About 55 mins to fix
src/components/Icon/Icons/Appearance.tsx on lines 8..18
src/components/Icon/Icons/Attach.tsx on lines 8..18
src/components/Icon/Icons/BookmarkFilled.tsx on lines 8..18
src/components/Icon/Icons/BookmarkOutline.tsx on lines 8..18
src/components/Icon/Icons/Building.tsx on lines 8..18
src/components/Icon/Icons/ButtonLink.tsx on lines 8..18
src/components/Icon/Icons/Calendar.tsx on lines 8..18
src/components/Icon/Icons/CalendarAdd.tsx on lines 8..18
src/components/Icon/Icons/Canva.tsx on lines 8..18
src/components/Icon/Icons/Caption.tsx on lines 8..18
src/components/Icon/Icons/Card.tsx on lines 8..18
src/components/Icon/Icons/CaretDown.tsx on lines 8..18
src/components/Icon/Icons/CaretLeft.tsx on lines 8..18
src/components/Icon/Icons/CaretRight.tsx on lines 8..18
src/components/Icon/Icons/CaretUp.tsx on lines 8..18
src/components/Icon/Icons/ChartLine.tsx on lines 8..18
src/components/Icon/Icons/ChevronDown.tsx on lines 8..18
src/components/Icon/Icons/ChevronUp.tsx on lines 8..18
src/components/Icon/Icons/CommentRoundOutline.tsx on lines 8..18
src/components/Icon/Icons/Copy.tsx on lines 8..18
src/components/Icon/Icons/Coupon.tsx on lines 8..18
src/components/Icon/Icons/Discord.tsx on lines 8..18
src/components/Icon/Icons/Dollar.tsx on lines 8..18
src/components/Icon/Icons/Drafts.tsx on lines 8..18
src/components/Icon/Icons/Feed.tsx on lines 8..18
src/components/Icon/Icons/Frequency.tsx on lines 8..18
src/components/Icon/Icons/Gear.tsx on lines 8..18
src/components/Icon/Icons/Giphy.tsx on lines 8..18
src/components/Icon/Icons/Github.tsx on lines 8..18
src/components/Icon/Icons/GoogleDrive.tsx on lines 8..18
src/components/Icon/Icons/Hashtag.tsx on lines 8..18
src/components/Icon/Icons/HeartFilled.tsx on lines 8..18
src/components/Icon/Icons/HeartOutline.tsx on lines 8..18
src/components/Icon/Icons/Image.tsx on lines 8..18
src/components/Icon/Icons/Inbox.tsx on lines 8..18
src/components/Icon/Icons/Info.tsx on lines 8..18
src/components/Icon/Icons/InstagramDm.tsx on lines 8..18
src/components/Icon/Icons/InstagramGrid.tsx on lines 8..18
src/components/Icon/Icons/InstagramLike.tsx on lines 8..18
src/components/Icon/Icons/Layout.tsx on lines 8..18
src/components/Icon/Icons/LinkedIn.tsx on lines 8..18
src/components/Icon/Icons/Location.tsx on lines 8..18
src/components/Icon/Icons/Locked.tsx on lines 8..18
src/components/Icon/Icons/MessageOutline.tsx on lines 8..18
src/components/Icon/Icons/MessageRoundOutline.tsx on lines 8..18
src/components/Icon/Icons/MessageSquareOutline.tsx on lines 8..18
src/components/Icon/Icons/Messenger.tsx on lines 8..18
src/components/Icon/Icons/PercentageDown.tsx on lines 8..18
src/components/Icon/Icons/PercentageUp.tsx on lines 8..18
src/components/Icon/Icons/Phone.tsx on lines 8..18
src/components/Icon/Icons/PlayRound.tsx on lines 8..18
src/components/Icon/Icons/Plus.tsx on lines 8..18
src/components/Icon/Icons/Post.tsx on lines 8..18
src/components/Icon/Icons/Publish.tsx on lines 8..18
src/components/Icon/Icons/Retweet.tsx on lines 8..18
src/components/Icon/Icons/Save.tsx on lines 8..18
src/components/Icon/Icons/ShareArrowOutline.tsx on lines 8..18
src/components/Icon/Icons/Sms.tsx on lines 8..18
src/components/Icon/Icons/Spam.tsx on lines 8..18
src/components/Icon/Icons/StartPage.tsx on lines 8..18
src/components/Icon/Icons/Stats.tsx on lines 8..18
src/components/Icon/Icons/Subheading.tsx on lines 8..18
src/components/Icon/Icons/Tag.tsx on lines 8..18
src/components/Icon/Icons/TextAlignCenter.tsx on lines 8..18
src/components/Icon/Icons/TextAlignRight.tsx on lines 8..18
src/components/Icon/Icons/TextBold.tsx on lines 8..18
src/components/Icon/Icons/TextExpand.tsx on lines 8..18
src/components/Icon/Icons/TextSummarize.tsx on lines 8..18
src/components/Icon/Icons/TextUnderline.tsx on lines 8..18
src/components/Icon/Icons/Thread.tsx on lines 8..18
src/components/Icon/Icons/Tiktok.tsx on lines 8..18
src/components/Icon/Icons/Title.tsx on lines 8..18
src/components/Icon/Icons/Twitter.tsx on lines 8..18
src/components/Icon/Icons/Unlocked.tsx on lines 8..18
src/components/Icon/Icons/Video.tsx on lines 8..18
src/components/Icon/Icons/Warning.tsx on lines 8..18
src/components/Icon/Icons/Website.tsx on lines 8..18
src/components/Icon/Icons/Whatsapp.tsx on lines 8..18
src/components/Icon/Icons/Youtube.tsx on lines 8..18

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

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