Showing 51 of 107 total issues
Function getPresenceString
has a Cognitive Complexity of 40 (exceeds 5 allowed). Consider refactoring. Open
SteamUser.prototype.getPresenceString = async function (
steamData: SteamUser.PersonaData,
groupNumber: number
): Promise<string | undefined> {
if (steamData.rich_presence.length > 0) {
- 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
File tailwind.config.js
has 355 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable */
/*
Tailwind - The Utility-First CSS Framework
Function getPresenceString
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
SteamUser.prototype.getPresenceString = async function (
steamData: SteamUser.PersonaData,
groupNumber: number
): Promise<string | undefined> {
if (steamData.rich_presence.length > 0) {
Class Release
has 26 methods (exceeds 20 allowed). Consider refactoring. Open
class Release
include Comparable
attr_reader :codename,
:commits,
Method to_toml
has a Cognitive Complexity of 19 (exceeds 5 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? }.
- 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 get_new_version
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def get_new_version(last_version, commits)
next_version =
if commits.any? { |c| breaking_change?(c) }
next_version = "#{last_version.major + 1}.0.0"
- 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
`` has 22 functions (exceeds 20 allowed). Consider refactoring. Open
export default {
name: 'easing',
// no easing, no acceleration
linear(t, b, c, d) {
return (c * t) / d + b;
Method initialize
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
def initialize(release_hash, last_version)
@codename = release_hash["codename"] || ""
@description = release_hash["description"] || ""
@date = release_hash.fetch("date").to_date
@last_version = last_version
Function syncNumbers
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
const syncNumbers = async (): Promise<void> => {
const connectedClients = await Ts3.clientList({
clientType: 0
});
Method initialize
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def initialize(release_hash, last_version)
@codename = release_hash["codename"] || ""
@description = release_hash["description"] || ""
@date = release_hash.fetch("date").to_date
@last_version = last_version
- 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 checkServerGroup
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
const checkServerGroup = async (
user: VerifiedClientDocument,
presenceString: string | undefined,
data: SteamUser.PersonaData,
client: TeamSpeakClient | undefined
Function loadPlugins
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
TeamSpeak.prototype.loadPlugins = async function (): Promise<void> {
getFiles(path.join(__dirname, `../../../core/TeamSpeak/plugins/${instance}`)).then((files) => {
const jsfiles = flattenArray(files).filter((f) => f.split('.').pop() === 'ts');
jsfiles.forEach((file) => {
try {
Method to_struct
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
def to_struct(should_have_keys: [], &block)
new_hash = {}
each do |key, val|
new_hash[key] =
- 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 get_new_version
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
def get_new_version(last_version, commits)
next_version =
if commits.any? { |c| breaking_change?(c) }
next_version = "#{last_version.major + 1}.0.0"
Function watchPlugins
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
TeamSpeak.prototype.watchPlugins = async function (): Promise<void> {
chokidar
.watch(path.join(__dirname, `../../../core/TeamSpeak/plugins/${instance}`), {
ignoreInitial: true
})
Method create_release_meta_file!
has 43 lines of code (exceeds 25 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!
Function watchGames
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
SteamUser.prototype.watchGames = function (): void {
chokidar
.watch(path.join(__dirname, '../../../core/Steam/games'), { ignoreInitial: true })
.on('all', (event, file) => {
const fileName = path.basename(file);
Function clientDescrtiption
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const clientDescrtiption = async function (req: Request, res: Response): Promise<any> {
const canvas = Canvas.createCanvas(800, 250);
const ctx = canvas.getContext('2d');
request
Function main
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const main = async function (
data: SteamUser.PersonaData,
client: TeamSpeakClient | undefined,
user: VerifiedClientDocument
): Promise<void> {
Function login
has 39 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 steamData = await findSecret(req);
const [client] = await findClients(req, {