cerniglj1/osrs-quest-tool

View on GitHub

Showing 336 of 336 total issues

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

module.exports = exports = [{
        "miniquest": false,
        "name": "A Soul's Bane",
        "shortName": "aSoulsBane",
        "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
Severity: Major
Found in lib/resources/quest/questDataArray.js and 1 other location - About 4 mos to fix
src/resources/questDataArray.js on lines 1..5489

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

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

module.exports = exports = [{
        "miniquest": false,
        "name": "A Soul's Bane",
        "shortName": "aSoulsBane",
        "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
Severity: Major
Found in src/resources/questDataArray.js and 1 other location - About 4 mos to fix
lib/resources/quest/questDataArray.js on lines 1..5489

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

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

var slayerData = [
  {
    Turael: {
      name: 'Turael',
      assignments: [
Severity: Major
Found in lib/resources/slayer/slayerData.js and 1 other location - About 3 mos to fix
src/resources/slayer/slayerData.js on lines 1..4438

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

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

var slayerData = [
  {
    Turael: {
      name: 'Turael',
      assignments: [
Severity: Major
Found in src/resources/slayer/slayerData.js and 1 other location - About 3 mos to fix
lib/resources/slayer/slayerData.js on lines 1..4438

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

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

File questData.js has 5627 lines of code (exceeds 250 allowed). Consider refactoring.
Open

export default {
  "A Soul's Bane": {
    miniquest: false,
    name: "A Soul's Bane",
    shortName: 'aSoulsBane',
Severity: Major
Found in lib/resources/quest/questData.js - About 2 wks to fix

    File questData.js has 5489 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    module.exports = exports = {
        "A Soul's Bane": {
            "miniquest": false,
            "name": "A Soul's Bane",
            "shortName": "aSoulsBane",
    Severity: Major
    Found in src/resources/questData.js - About 2 wks to fix

      File questDataArray.js has 5488 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      module.exports = exports = [{
              "miniquest": false,
              "name": "A Soul's Bane",
              "shortName": "aSoulsBane",
              "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
      Severity: Major
      Found in lib/resources/quest/questDataArray.js - About 2 wks to fix

        File questDataArray.js has 5488 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        module.exports = exports = [{
                "miniquest": false,
                "name": "A Soul's Bane",
                "shortName": "aSoulsBane",
                "url": "https://oldschool.runescape.wiki/w/A_Soul%27s_Bane",
        Severity: Major
        Found in src/resources/questDataArray.js - About 2 wks to fix

          File slayerData.js has 4454 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          var slayerData = [
            {
              Turael: {
                name: 'Turael',
                assignments: [
          Severity: Major
          Found in lib/resources/slayer/slayerData.js - About 1 wk to fix

            File slayerData.js has 4454 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            var slayerData = [
              {
                Turael: {
                  name: 'Turael',
                  assignments: [
            Severity: Major
            Found in src/resources/slayer/slayerData.js - About 1 wk to fix

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

              function meetQuestRequirements(quest, account) {
                if (quest === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Major
              Found in lib/osrstools.js and 1 other location - About 3 days to fix
              lib/osrstools.js on lines 324..413

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

              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

              function meetsRequirement(quest, account) {
                if (quest === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Major
              Found in lib/osrstools.js and 1 other location - About 3 days to fix
              lib/osrstools.js on lines 121..210

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

              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

              const SlayerUnlocks = [
                {
                  name: 'Gargoyle smasher',
                  cost: 120,
                  description:
              Severity: Major
              Found in src/resources/slayer/slayerUnlocks.js and 1 other location - About 2 days to fix
              lib/resources/slayer/slayerUnlocks.js on lines 1..164

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

              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

              const SlayerUnlocks = [
                {
                  name: 'Gargoyle smasher',
                  cost: 120,
                  description:
              Severity: Major
              Found in lib/resources/slayer/slayerUnlocks.js and 1 other location - About 2 days to fix
              src/resources/slayer/slayerUnlocks.js on lines 1..164

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

              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

              const SlayerExtends = [
                {
                  name: 'Need more darkness',
                  cost: 100,
                  notes: 'Number of dark beasts assigned is increased to 100-149.',
              Severity: Major
              Found in src/resources/slayer/slayerExtends.js and 1 other location - About 2 days to fix
              lib/resources/slayer/slayerExtends.js on lines 1..128

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

              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

              const SlayerExtends = [
                {
                  name: 'Need more darkness',
                  cost: 100,
                  notes: 'Number of dark beasts assigned is increased to 100-149.',
              Severity: Major
              Found in lib/resources/slayer/slayerExtends.js and 1 other location - About 2 days to fix
              src/resources/slayer/slayerExtends.js on lines 1..128

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

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

              def updateQuestDataByRow(quest_data, row):
                  sections = row.find_all("th", {"class": "questdetails-header"})
                  details = row.find_all("td", {"class": "questdetails-info"})
                  quest_details = None
                  section_name = None
              Severity: Minor
              Found in tools/getQuestData.py - About 1 day 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 canCompleteQuest has a Cognitive Complexity of 74 (exceeds 5 allowed). Consider refactoring.
              Open

                canCompleteQuest(quest) {
                  if (quest == undefined || quest == null) {
                    return true;
                  }
              
              
              Severity: Minor
              Found in lib/model/quest/QuestTool.js - About 1 day 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 canCompleteQuest has a Cognitive Complexity of 66 (exceeds 5 allowed). Consider refactoring.
              Open

              function canCompleteQuest(quest, account) {
                if (quest.name === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Minor
              Found in lib/osrstools.js - About 1 day 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 meetQuestRequirements has a Cognitive Complexity of 59 (exceeds 5 allowed). Consider refactoring.
              Open

              function meetQuestRequirements(quest, account) {
                if (quest === 'Recipe for Disaster') {
                  // TODO
                  // Pirate Pete Subquest of Recipe for Disaster
                  return true;
              Severity: Minor
              Found in lib/osrstools.js - About 1 day 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

              Severity
              Category
              Status
              Source
              Language