Showing 250 of 735 total issues
Function leave
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
async leave(participant: Participant): Promise<void> {
logger.info('leave() | participantId: %s | roomId: %s', participant.participantId, this.id);
const status = this.participantStatus.get(participant.participantId);
if (status) {
- 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 AssertSyncObject
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
await connection.SyncObjects.AssertSyncObject<SynchronizedSubscriptions>(subscriptionsId,
x => Assert.Contains(x.Subscriptions.Keys, id => id == testRoomChannel));
Method Whiteboard
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record Whiteboard (string Id, string FriendlyName, bool AnyoneCanEdit, WhiteboardCanvas Canvas,
IImmutableDictionary<string, ParticipantWhiteboardState> ParticipantStates, int Version);
Method OpenBreakoutRoomsRequest
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record OpenBreakoutRoomsRequest(int Amount, DateTimeOffset? Deadline, string? Description,
string[][]? AssignedRooms, string ConferenceId) : BreakoutRoomsConfig(Amount, Deadline, Description),
Method ChatMessageDto
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record ChatMessageDto(int Id, string Channel, ChatMessageSender? Sender, string Message,
DateTimeOffset Timestamp, ChatMessageOptions Options);
Method SynchronizedConferenceInfo
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record SynchronizedConferenceInfo(bool IsOpen, IImmutableList<string> Moderators,
DateTimeOffset? ScheduledDate, string? Name, bool IsPrivateChatEnabled, SceneOptions SceneOptions)
Method DrawingLineCanvasLiveAction
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record DrawingLineCanvasLiveAction (string Color, double StrokeWidth, double StartX, double StartY,
double EndX, double EndY) : CanvasLiveAction;
Consider simplifying this complex logical expression. Open
Open
if (!left || !top || !groupLeft || !groupTop || !groupWidth || !groupHeight)
return { left: undefined, top: undefined };
Consider simplifying this complex logical expression. Open
Open
if (!left || !top || !groupLeft || !groupTop || !groupWidth || !groupHeight) return;
Function wrapControl
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
source: ProducerSource,
device: AnyInputDevice | undefined,
local: UseMediaState,
equipment: Record<string, EquipmentConnection> | undefined,
dispatch: Dispatch<any>,
Function conferenceFactory
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
id: string,
workers: MediaSoupWorkers,
repository: ConferenceRepository,
rabbit: RabbitMqConn,
{ routerOptions, webrtcOptions, maxIncomingBitrate }: ConferenceManagerOptions,
Method SynchronizedPoll
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record SynchronizedPoll(string Id, PollInstruction Instruction, PollConfig Config, PollState State,
DateTimeOffset CreatedOn)
Method IsUpdateRequired
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
ValueTask<SceneUpdate> IsUpdateRequired(string conferenceId, string roomId, string syncObjId,
object synchronizedObject, object? previousValue);
Method InternalIsUpdateRequired
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
protected abstract ValueTask<bool> InternalIsUpdateRequired(string conferenceId, string roomId,
string syncObjId, object synchronizedObject, object? previousValue);
Method ReadJson
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public override Error? ReadJson(JsonReader reader, Type objectType, Error? existingValue, bool hasExistingValue,
JsonSerializer serializer)
Method RoomRepository_SetParticipantRoom
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
private static async ValueTask<RedisResult> RoomRepository_SetParticipantRoom(IKeyValueDatabaseActions actions,
string roomMappingKey, string roomListKey, string participantId, string newRoomId)
Method JoinedParticipantsRepository_RemoveParticipantSafe
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
IKeyValueDatabaseActions actions, string participantId, string participantKey, string conferenceKeyTemplate,
string connectionId)
Method IsUpdateRequired
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public async ValueTask<SceneUpdate> IsUpdateRequired(string conferenceId, string roomId, string syncObjId,
object synchronizedObject, object? previousValue)
Method CreatePollRequest
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record CreatePollRequest(string ConferenceId, PollInstruction Instruction, PollConfig Config,
PollState InitialState, string? RoomId) : IRequest<string>;
Method SendEquipmentCommandNotification
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
public record SendEquipmentCommandNotification(Participant Participant, string ConnectionId, ProducerSource Source,
string? DeviceId, EquipmentCommandType Action) : INotification;