Showing 3,233 of 8,169 total issues
File emojis.ts
has 4630 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const emojis = {
':england:': '๐ด๓ ง๓ ข๓ ฅ๓ ฎ๓ ง๓ ฟ',
':scotland:': '๐ด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ',
':wales:': '๐ด๓ ง๓ ข๓ ท๓ ฌ๓ ณ๓ ฟ',
':men_holding_hands_medium_light_skin_tone_light_skin_tone:': '๐จ๐ผโ๐คโ๐จ๐ป',
File omnichannel.ts
has 3497 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
IOmnichannelCannedResponse,
ILivechatAgent,
ILivechatDepartment,
ILivechatDepartmentAgents,
File Users.js
has 2516 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { ILivechatAgentStatus } from '@rocket.chat/core-typings';
import { Subscriptions } from '@rocket.chat/models';
import { escapeRegExp } from '@rocket.chat/string-helpers';
import { BaseRaw } from './BaseRaw';
File LivechatRooms.ts
has 2483 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
IOmnichannelRoom,
RocketChatRecordDeleted,
IOmnichannelRoomClosingInfo,
DeepWritable,
Function createSetupWSettings
has 1348 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
settingsRegistry.addGroup('Setup_Wizard', async function () {
await this.section('Organization_Info', async function () {
await this.add('Organization_Type', '', {
type: 'select',
values: [
Function addManagementRoutes
has a Cognitive Complexity of 274 (exceeds 5 allowed). Consider refactoring. Open
Open
addManagementRoutes() {
const orchestrator = this._orch;
const manager = this._manager;
const handleError = (message: string, e: any) => {
- 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 emojiPicker.ts
has 1943 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* This file is automatically generated from generateEmojiIndex.mjs
* Last generated Tue Apr 09 2019 15:27:21 GMT-0300 (-03)
*
* Mapping category hashes into human readable and translated names
Function addManagementRoutes
has 1017 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
addManagementRoutes() {
const orchestrator = this._orch;
const manager = this._manager;
const handleError = (message: string, e: any) => {
File UiKitParserModal.spec.ts
has 1857 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type { OverflowElement } from '../../blocks/elements/OverflowElement';
import type { PlainText } from '../../blocks/text/PlainText';
import { BlockContext } from '../../rendering/BlockContext';
import { UiKitParserModal } from './UiKitParserModal';
import { uiKitModal } from './uiKitModal';
File UiKitParserContextualBar.spec.ts
has 1857 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type { OverflowElement } from '../../blocks/elements/OverflowElement';
import type { PlainText } from '../../blocks/text/PlainText';
import { BlockContext } from '../../rendering/BlockContext';
import { UiKitParserContextualBar } from './UiKitParserContextualBar';
import { uiKitContextualBar } from './uiKitContextualBar';
File UiKitParserBanner.spec.ts
has 1856 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type { PlainText } from '../../blocks/text/PlainText';
import { BlockContext } from '../../rendering/BlockContext';
import { UiKitParserBanner } from './UiKitParserBanner';
import { uiKitBanner } from './uiKitBanner';
File Rooms.ts
has 1675 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
IDirectMessageRoom,
IMessage,
IOmnichannelGenericRoom,
IRoom,
File wordList.ts
has 1635 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export default [
'acrobat',
'africa',
'alaska',
'albert',
UsersRaw
has 215 functions (exceeds 20 allowed). Consider refactoring. Open
Open
export class UsersRaw extends BaseRaw {
constructor(db, trash) {
super(db, 'users', trash, {
collectionNameResolver(name) {
return name;
File Messages.ts
has 1530 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
ILivechatDepartment,
IMessage,
IRoom,
IUser,
File Sessions.ts
has 1508 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
ISession,
UserSessionAggregation,
DeviceSessionAggregation,
OSSessionAggregation,
File Subscriptions.ts
has 1466 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import type {
AtLeast,
IRole,
IRoom,
ISubscription,
Function createAccountSettings
has 762 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
settingsRegistry.addGroup('Accounts', async function () {
await this.section('Two Factor Authentication', async function () {
const enable2FA = {
_id: 'Accounts_TwoFactorAuthentication_Enabled',
value: true,
File UiKitParserMessage.spec.ts
has 1388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { BlockContext } from '../../rendering/BlockContext';
import { UiKitParserMessage } from './UiKitParserMessage';
import { uiKitMessage } from './uiKitMessage';
class TestParser extends UiKitParserMessage<unknown> {
File UiKitParserAttachment.spec.ts
has 1388 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { BlockContext } from '../../rendering/BlockContext';
import { UiKitParserAttachment } from './UiKitParserAttachment';
import { uiKitAttachment } from './uiKitAttachment';
class TestParser extends UiKitParserAttachment<unknown> {