Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable credo duplicated code check #2490

Merged
merged 3 commits into from
Aug 6, 2019
Merged

Conversation

ayrat555
Copy link
Contributor

@ayrat555 ayrat555 commented Aug 1, 2019

Credo was returning a false-negative duplicated code check result before these changes (#2432). The false-negative issue was fixed in 1.1 (https://github.com/rrrene/credo/blame/master/CHANGELOG.md#L18)

Currently, the number of characters of every duplicated code warning is lower than 80. I think it's containable.

resolves #2436

Changelog

  • enable credo duplicated code check

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12e10d45-3cab-49be-b5d1-1a73a5438d21

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 16 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.003%) to 79.268%

Files with Coverage Reduction New Missed Lines %
apps/indexer/lib/indexer/block/catchup/fetcher.ex 16 69.23%
Totals Coverage Status
Change from base Build c49d5f25-83c9-4412-b651-f9aecb6f0de9: 0.003%
Covered Lines: 5154
Relevant Lines: 6502

💛 - Coveralls

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mass_threshold: 80

why 80 characters are chosen for the threshold? if to remove mass_threshold: 80, will be credo warnings? if yes, at which lines?

@ayrat555
Copy link
Contributor Author

ayrat555 commented Aug 5, 2019

@vbaranov duplication is mostly in fetchers in GenServer callbacks. I think that containable. They're already abstracted with Indexer.Fetcher macro modulr
All warnings are described in #2436

@vbaranov vbaranov self-requested a review August 5, 2019 14:32
@vbaranov vbaranov merged commit 986ac28 into master Aug 6, 2019
@vbaranov vbaranov deleted the ab-fix-duplicated-code-warnings branch August 6, 2019 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix duplicated code credo warnings
5 participants