Showing 51 of 107 total issues
Function install
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
install(Vue) {
if (process.env.NODE_ENV === 'production') {
register(`${process.env.BASE_URL}service-worker.js`, {
ready() {
console.log(
Function checkDescriptionBanner
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
const checkDescriptionBanner = async (
client: TeamSpeakClient | undefined,
presenceString: string | undefined,
data: SteamUser.PersonaData,
steamId: string
Function send
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const send = async function (req: Request, res: Response): Promise<any> {
log.info(`Received verification send request to ${req.body.dbid} from remote.`, {
type: 'website'
});
try {
Method to_toml
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_toml(hash_style: :expanded)
if is_a?(Hash)
values =
(hash_style == :flatten ? flatten : self).
select { |_k, v| !v.nil? }.
Function send
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const send = async function (req: Request, res: Response): Promise<any> {
log.info(`Received send request to ${req.body.dbid} from remote.`, { type: 'website' });
try {
const [client] = await findClients(
req,
Function login
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const login = async function (req: Request, res: Response): Promise<any> {
log.info(`Received login request from ${req.body.dbid}.`, { type: 'website' });
try {
const [client] = await findClients(
req,
Function getColor
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
getColor(colorx, alphax = 1, defaultx = true) {
// change color hex to RGB
if (/^[#]/.test(colorx)) {
const c = this.hexToRgb(colorx);
- 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
Method create_release_meta_file!
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def create_release_meta_file!(current_commits, new_version)
release_meta_path = "#{RELEASE_META_DIR}/#{new_version}.toml"
# Grab all existing commits
existing_commits = get_existing_commits!
- 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 main
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const main = async function (): Promise<void> {
const { data } = info.config;
const serverInfo = await Ts3.serverInfo();
const edited_name = {
'[ONLINE]': data.showQueryClients
Method parse_commit_message!
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
def parse_commit_message!(message)
match = message.match(/^(?<type>[a-z]*)(\((?<scope>[a-z0-9_,\- ]*)\))?(?<breaking_change>!)?: (?<description>.*?)( \(#(?<pr_number>[0-9]*)\))?$/)
if match.nil?
raise <<~EOF
Function main
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const main = async function (): Promise<void> {
const { data } = info.config;
const clients = await Ts3.clientList({ clientType: 0 });
clients.forEach(async (client) => {
if (client.isAfk(data.minTime) && client.cid !== data.dest) {
Function rColor
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
rColor(colorx, opacity = 1) {
if (/^[#]/.test(colorx)) {
const c = this.hexToRgb(colorx);
colorx = `rgba(${c.r},${c.g},${c.b},${opacity})`;
} else if (/^[rgb]/.test(colorx)) {
- 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 loadGames
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
SteamUser.prototype.loadGames = async function (): Promise<void> {
getFiles(path.join(__dirname, '../../../core/Steam/games')).then((files) => {
const jsfiles = flattenArray(files).filter((f) => f.split('.').pop() === 'ts');
jsfiles.forEach((file) => {
try {
Function drawTextWithEmoji
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Canvas.CanvasRenderingContext2D.prototype.drawTextWithEmoji = async function (
fillType: string,
text: string,
x: number,
y: number,
Function changePosition
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
changePosition(elx, content, conditional) {
let topx = 0;
let leftx = 0;
let widthx = 0;
const scrollTopx = window.pageYOffset || document.documentElement.scrollTop;
Function main
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const main = async function (): Promise<void> {
const { data } = info.config;
const serverInfo = await Ts3.serverInfo();
const replacements = {
'[SERVER_ONLINE]': data.showQueryClients
Function drawTextWithEmoji
has 7 arguments (exceeds 4 allowed). Consider refactoring. Open
fillType: string,
text: string,
x: number,
y: number,
maxWidth?: number,
Function vsfunction
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
vsfunction(json) {
for (const clave in json) {
if (Object.prototype.hasOwnProperty.call(json, clave)) {
let colorx;
if (/^[rgb(]/g.test(json[clave])) {
- 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
Method component
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def component
return @component if defined?(@component)
component_name = name.split(" ").first
- 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 drawTextWithEmoji
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Canvas.CanvasRenderingContext2D.prototype.drawTextWithEmoji = async function (
fillType: string,
text: string,
x: number,
y: number,
- 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"