rl404/go-malscraper

View on GitHub

Showing 369 of 389 total issues

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

func (_m *API) GetGenres(_type string) ([]model.ItemCount, int, error) {
    ret := _m.Called(_type)

    var r0 []model.ItemCount
    if rf, ok := ret.Get(0).(func(string) []model.ItemCount); ok {
Severity: Major
Found in service/mocks/API.go and 23 other locations - About 4 hrs to fix
service/mocks/API.go on lines 46..73
service/mocks/API.go on lines 76..103
service/mocks/API.go on lines 106..133
service/mocks/API.go on lines 194..221
service/mocks/API.go on lines 254..281
service/mocks/API.go on lines 314..341
service/mocks/API.go on lines 554..581
service/mocks/API.go on lines 584..611
service/mocks/API.go on lines 674..701
service/mocks/API.go on lines 824..851
service/mocks/API.go on lines 974..1001
service/mocks/API.go on lines 1004..1031
service/mocks/API.go on lines 1034..1061
service/mocks/API.go on lines 1092..1119
service/mocks/API.go on lines 1152..1179
service/mocks/API.go on lines 1392..1419
service/mocks/API.go on lines 1422..1449
service/mocks/API.go on lines 1452..1479
service/mocks/API.go on lines 1482..1509
service/mocks/API.go on lines 1542..1569
service/mocks/API.go on lines 1812..1839
service/mocks/API.go on lines 1872..1899
service/mocks/API.go on lines 1962..1989

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

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

func (_m *API) GetManga(id int) (*model.Manga, int, error) {
    ret := _m.Called(id)

    var r0 *model.Manga
    if rf, ok := ret.Get(0).(func(int) *model.Manga); ok {
Severity: Major
Found in service/mocks/API.go and 13 other locations - About 4 hrs to fix
service/mocks/API.go on lines 16..43
service/mocks/API.go on lines 344..371
service/mocks/API.go on lines 434..461
service/mocks/API.go on lines 524..551
service/mocks/API.go on lines 704..731
service/mocks/API.go on lines 794..821
service/mocks/API.go on lines 1212..1239
service/mocks/API.go on lines 1272..1299
service/mocks/API.go on lines 1362..1389
service/mocks/API.go on lines 1692..1719
service/mocks/API.go on lines 1902..1929
service/mocks/API.go on lines 1992..2019
service/mocks/API.go on lines 2172..2199

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

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

func (_m *API) GetClubPicture(id int) ([]string, int, error) {
    ret := _m.Called(id)

    var r0 []string
    if rf, ok := ret.Get(0).(func(int) []string); ok {
Severity: Major
Found in service/mocks/API.go and 4 other locations - About 3 hrs to fix
service/mocks/API.go on lines 224..251
service/mocks/API.go on lines 644..671
service/mocks/API.go on lines 1122..1149
service/mocks/API.go on lines 1512..1539

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

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

func (_m *API) GetCharacterPicture(id int) ([]string, int, error) {
    ret := _m.Called(id)

    var r0 []string
    if rf, ok := ret.Get(0).(func(int) []string); ok {
Severity: Major
Found in service/mocks/API.go and 4 other locations - About 3 hrs to fix
service/mocks/API.go on lines 224..251
service/mocks/API.go on lines 764..791
service/mocks/API.go on lines 1122..1149
service/mocks/API.go on lines 1512..1539

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

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

func (_m *API) GetMangaPicture(id int) ([]string, int, error) {
    ret := _m.Called(id)

    var r0 []string
    if rf, ok := ret.Get(0).(func(int) []string); ok {
Severity: Major
Found in service/mocks/API.go and 4 other locations - About 3 hrs to fix
service/mocks/API.go on lines 224..251
service/mocks/API.go on lines 644..671
service/mocks/API.go on lines 764..791
service/mocks/API.go on lines 1512..1539

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

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

func (_m *API) GetPeoplePicture(id int) ([]string, int, error) {
    ret := _m.Called(id)

    var r0 []string
    if rf, ok := ret.Get(0).(func(int) []string); ok {
Severity: Major
Found in service/mocks/API.go and 4 other locations - About 3 hrs to fix
service/mocks/API.go on lines 224..251
service/mocks/API.go on lines 644..671
service/mocks/API.go on lines 764..791
service/mocks/API.go on lines 1122..1149

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

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

func (_m *API) GetAnimePicture(id int) ([]string, int, error) {
    ret := _m.Called(id)

    var r0 []string
    if rf, ok := ret.Get(0).(func(int) []string); ok {
Severity: Major
Found in service/mocks/API.go and 4 other locations - About 3 hrs to fix
service/mocks/API.go on lines 644..671
service/mocks/API.go on lines 764..791
service/mocks/API.go on lines 1122..1149
service/mocks/API.go on lines 1512..1539

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

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 (a *anime) setDetail() {
    searchList := []model.AnimeSearch{}
    a.area.Find("table").Find("tr").EachWithBreak(func(i int, eachSearch *goquery.Selection) bool {
        if eachSearch.Find(".picSurround").Text() == "" {
            return true
Severity: Major
Found in internal/parser/search/search_anime.go and 1 other location - About 3 hrs to fix
internal/parser/search/search_manga.go on lines 24..47

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

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 (r *review) setDetail() {
    reviews := []model.Review{}

    source := model.Source{
        ID:    r.getSourceID(),
Severity: Major
Found in internal/parser/anime/anime_review.go and 1 other location - About 3 hrs to fix
internal/parser/manga/manga_review.go on lines 26..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 306.

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 (r *review) setDetail() {
    reviews := []model.Review{}

    source := model.Source{
        ID:    r.getSourceID(),
Severity: Major
Found in internal/parser/manga/manga_review.go and 1 other location - About 3 hrs to fix
internal/parser/anime/anime_review.go on lines 26..53

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

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 (m *manga) setDetail() {
    searchList := []model.MangaSearch{}
    m.area.Find("table").Find("tr").EachWithBreak(func(i int, eachSearch *goquery.Selection) bool {
        if eachSearch.Find(".picSurround").Text() == "" {
            return true
Severity: Major
Found in internal/parser/search/search_manga.go and 1 other location - About 3 hrs to fix
internal/parser/search/search_anime.go on lines 24..47

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

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 (v *Validator) GetUserManga(query model.UserListQuery) ([]model.UserManga, int, error) {
    if len(query.Username) < 2 || len(query.Username) > 16 {
        return nil, http.StatusBadRequest, errors.ErrInvalidUsername
    }
    if query.Page == 0 {
Severity: Major
Found in internal/validator/user.go and 1 other location - About 3 hrs to fix
internal/validator/user.go on lines 193..223

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

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 (v *Validator) GetUserAnime(query model.UserListQuery) ([]model.UserAnime, int, error) {
    if len(query.Username) < 2 || len(query.Username) > 16 {
        return nil, http.StatusBadRequest, errors.ErrInvalidUsername
    }
    if query.Page == 0 {
Severity: Major
Found in internal/validator/user.go and 1 other location - About 3 hrs to fix
internal/validator/user.go on lines 226..256

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

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 (_m *API) GetProducers() ([]model.ItemCount, int, error) {
    ret := _m.Called()

    var r0 []model.ItemCount
    if rf, ok := ret.Get(0).(func() []model.ItemCount); ok {
Severity: Major
Found in service/mocks/API.go and 2 other locations - About 3 hrs to fix
service/mocks/API.go on lines 464..491
service/mocks/API.go on lines 914..941

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

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 (_m *API) GetMagazines() ([]model.ItemCount, int, error) {
    ret := _m.Called()

    var r0 []model.ItemCount
    if rf, ok := ret.Get(0).(func() []model.ItemCount); ok {
Severity: Major
Found in service/mocks/API.go and 2 other locations - About 3 hrs to fix
service/mocks/API.go on lines 464..491
service/mocks/API.go on lines 1602..1629

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

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 (_m *API) GetArticleTag() ([]model.ArticleTagItem, int, error) {
    ret := _m.Called()

    var r0 []model.ArticleTagItem
    if rf, ok := ret.Get(0).(func() []model.ArticleTagItem); ok {
Severity: Major
Found in service/mocks/API.go and 2 other locations - About 3 hrs to fix
service/mocks/API.go on lines 914..941
service/mocks/API.go on lines 1602..1629

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

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 (_m *API) GetMangaMoreInfo(id int) (string, int, error) {
    ret := _m.Called(id)

    var r0 string
    if rf, ok := ret.Get(0).(func(int) string); ok {
Severity: Major
Found in service/mocks/API.go and 1 other location - About 3 hrs to fix
service/mocks/API.go on lines 166..191

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

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 (_m *API) GetAnimeMoreInfo(id int) (string, int, error) {
    ret := _m.Called(id)

    var r0 string
    if rf, ok := ret.Get(0).(func(int) string); ok {
Severity: Major
Found in service/mocks/API.go and 1 other location - About 3 hrs to fix
service/mocks/API.go on lines 1064..1089

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

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

package anime

import "github.com/PuerkitoBio/goquery"

type picture struct {
Severity: Major
Found in internal/parser/anime/anime_picture.go and 1 other location - About 2 hrs to fix
internal/parser/manga/manga_picture.go on lines 1..25

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

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

package manga

import "github.com/PuerkitoBio/goquery"

type picture struct {
Severity: Major
Found in internal/parser/manga/manga_picture.go and 1 other location - About 2 hrs to fix
internal/parser/anime/anime_picture.go on lines 1..25

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

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