Showing 82 of 336 total issues
Function meetsRequirement
has 57 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function meetsRequirement(quest, account) {
if (quest === 'Recipe for Disaster') {
// TODO
// Pirate Pete Subquest of Recipe for Disaster
return true;
Function parse_req_str
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
Open
def parse_req_str(requirementString):
requirementObject = {}
quests = []
x_arr = requirementString.split(' ')
# TODO
- Read upRead up
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 test
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function test() {
var reqs = {
"quests": [
"Big Chompy Bird Hunting",
Consider simplifying this complex logical expression. Open
Open
if (this.osrsAccount) {
const attklvl = this.osrsAccount.main.skills.attack?.level ?? 1;
const strlvl = this.osrsAccount.main.skills.strength?.level ?? 1;
const deflvl = this.osrsAccount.main.skills.defence?.level ?? 1;
const rangedlvl = this.osrsAccount.main.skills.ranged?.level ?? 1;
Function init
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
var jumpToCode = (function init() {
// Classes of code we would like to highlight in the file view
var missingCoverageClasses = ['.cbranch-no', '.cstat-no', '.fstat-no'];
// Elements to highlight in the file listing view
- Read upRead up
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 setCombatLevel
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
setCombatLevel() {
var attklvl = this.osrsAccount.main.skills.attack.level
? this.osrsAccount.main.skills.attack.level
: 1;
var strlvl = this.osrsAccount.main.skills.strength.level
Function highestBoost
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function highestBoost(skillName) {
/**
* List of highest boostable levels with skills including spicy stew etc
*/
switch (skillName) {
Function highestBoost
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
highestBoost(skillName) {
/**
*
*/
switch (skillName) {
Function test
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function test(): void {
const reqs = {
"quests": [
"Big Chompy Bird Hunting",
"Jungle Potion"
Function enableUI
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function enableUI() {
var i,
el,
ithSorter = function ithSorter(i) {
var col = cols[i];
Avoid deeply nested control flow statements. Open
Open
if (
account.main.skills[cur.skill] + highestBoost(cur.skill) <
cur.level
) {
return false;
Avoid deeply nested control flow statements. Open
Open
for any_requirement in some_list:
reqs.append(
{'type': 'quest', 'name': any_requirement.text})
# levels_and_quests = levels_and_quests[0]
# levels_list = levels_and_quests.find_all("li", {"class": "scp"})
Avoid deeply nested control flow statements. Open
Open
if (this.osrsAccount.main.skills[cur.skill] < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (account.main.skills[cur.skill] < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (cur.boostable) {
// check if max stew can reach
if (
account.main.skills[cur.skill] + highestBoost(cur.skill) <
cur.level
Avoid deeply nested control flow statements. Open
Open
if (account.main.combatLevel < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (this.osrsAccount.main.combatLevel < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (account.main.skills[cur.skill] < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
if (account.main.combatLevel < cur.level) {
return false;
}
Avoid deeply nested control flow statements. Open
Open
for any_requirement in req_items:
skills_needed.append("any: "+any_requirement)