mrgodhani/raven-reader

View on GitHub

Showing 218 of 218 total issues

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

  fetchArticlesByFeed (feedId) {
    return db.database
      .select()
      .from(db.articleTable)
      .where(db.articleTable.feed_uuid.eq(feedId))
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  deleteArticlesMulti (articles) {
    return db.database.delete().from(db.articleTable).where(db.articleTable.uuid.in(articles)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  fetchServicesFeeds (service) {
    return db.database.select().from(db.feedTable).where(db.feedTable.source.eq(service)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  deleteArticles (feedId) {
    return db.database.delete().from(db.articleTable).where(db.articleTable.feed_uuid.eq(feedId)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  deleteFeed (feedId) {
    return db.database.delete().from(db.feedTable).where(db.feedTable.uuid.eq(feedId)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  deleteCategoryMulti (titles) {
    return db.database.delete().from(db.categoryTable).where(db.categoryTable.title.in(titles)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124

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

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

  deleteFeedMulti (feedIds) {
    return db.database.delete().from(db.feedTable).where(db.feedTable.uuid.in(feedIds)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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

  deleteCategory (title) {
    return db.database.delete().from(db.categoryTable).where(db.categoryTable.title.eq(title)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 119..121
src/services/db.js on lines 125..127

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

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

  deleteCategoryBySource (source) {
    return db.database.delete().from(db.categoryTable).where(db.categoryTable.source.eq(source)).exec()
  },
Severity: Major
Found in src/services/db.js and 12 other locations - About 1 hr to fix
src/services/db.js on lines 10..12
src/services/db.js on lines 28..34
src/services/db.js on lines 35..41
src/services/db.js on lines 45..47
src/services/db.js on lines 48..50
src/services/db.js on lines 51..53
src/services/db.js on lines 70..72
src/services/db.js on lines 73..75
src/services/db.js on lines 76..78
src/services/db.js on lines 110..112
src/services/db.js on lines 122..124
src/services/db.js on lines 125..127

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

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 transformedEntries has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        const transformedEntries = JSON.parse(JSON.stringify(entries)).map((item) => {
          const isMedia = item.url.includes('youtube') || item.url.includes('vimeo')
          return {
            id: item.enclosure ? uuidstring(item.enclosure.enclosure_url) : uuidstring(item.url),
            uuid: item.enclosure ? uuidstring(item.enclosure.enclosure_url) : uuidstring(item.url),
Severity: Minor
Found in src/services/feedbin.js - About 1 hr to fix

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

          if (type === 'category') {
            return this.$store.state.Article.articles.filter(article => article.articles.category === feedid && !article.articles.read).length
          }
    Severity: Major
    Found in src/mixins/articleCount.js and 1 other location - About 1 hr to fix
    src/mixins/articleCount.js on lines 4..6

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

    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

          if (type === '' && feedid !== '') {
            return this.$store.state.Article.articles.filter(article => article.articles.feed_uuid === feedid && !article.articles.read).length
          }
    Severity: Major
    Found in src/mixins/articleCount.js and 1 other location - About 1 hr to fix
    src/mixins/articleCount.js on lines 7..9

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

    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

        const readArticles = state.articles.reduce((arr, item) => {
          if (item.articles.read) {
            arr.push(item.articles.uuid)
          }
          return arr
    Severity: Major
    Found in src/store/modules/Article.js and 1 other location - About 1 hr to fix
    src/store/modules/Article.js on lines 108..113

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

    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

        const sourceIds = state.articles.reduce((arr, item) => {
          if (item.articles.read) {
            arr.push(item.articles.source_id)
          }
          return arr
    Severity: Major
    Found in src/store/modules/Article.js and 1 other location - About 1 hr to fix
    src/store/modules/Article.js on lines 102..107

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

    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 cacheArticleData has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

      async cacheArticleData (responseData) {
        const cacheName = `raven-${responseData._id}`
        const cache = await caches.open(cacheName)
        const previouslyCached = await this.isCached(cacheName)
        const imgRe = /<img[^>]*src=(['"])(.*?)\1[^>]*>/ig
    Severity: Minor
    Found in src/services/cacheArticle.js - 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 parseOPML has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    export function parseOPML (data) {
      const domParser = new DOMParser()
      const doc = domParser.parseFromString(data, 'text/xml').getElementsByTagName('body')
      const parseError = doc[0].getElementsByTagName('parsererror')
      const sources = []
    Severity: Minor
    Found in src/services/opml.js - 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

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

                enclosure: isPodcast
                  ? {
                      type: item.enclosure[0].type,
                      url: item.enclosure[0].href,
                      length: item.enclosure[0].length
    Severity: Major
    Found in src/services/inoreader.js and 1 other location - About 1 hr to fix
    src/services/greader.js on lines 262..268

    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 posts has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      const posts = feeditems.posts.map((item) => {
        const podcast = checkIsPodCast(item)
        const articleLink = item.link ?? feed.meta.xmlurl ?? Math.random().toString(36).substring(7)
        if (podcast) {
          item.id = uuidstring(item.enclosure.url)
    Severity: Minor
    Found in src/parsers/feed.js - About 1 hr to fix

      Function handleInoreader has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function handleInoreader (url) {
        if (url.includes('ravenreader://inoreader/auth')) {
          const q = new URL(url).searchParams
          if (q.has('code')) {
            axios.post('https://www.inoreader.com/oauth2/token', {
      Severity: Minor
      Found in src/background.js - About 1 hr to fix

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

                    enclosure: isPodcast
                      ? {
                          type: item.enclosure[0].type,
                          url: item.enclosure[0].href,
                          length: item.enclosure[0].length
        Severity: Major
        Found in src/services/greader.js and 1 other location - About 1 hr to fix
        src/services/inoreader.js on lines 282..288

        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

        Severity
        Category
        Status
        Source
        Language