Showing 250 of 735 total issues
File CoreHub.cs
has 473 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Autofac;
Class CoreHub
has 46 methods (exceeds 20 allowed). Consider refactoring. Open
[Authorize]
public class CoreHub : ScopedHub, ISfuConnectionHub
{
private readonly ICoreHubConnections _connections;
private readonly ILogger<CoreHub> _logger;
File InMemoryKeyValueDatabaseTests.cs
has 421 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Extensions.Options;
using Strive.Infrastructure.KeyValue;
Function SceneManagement
has 142 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function SceneManagement() {
const dispatch = useDispatch();
const classes = useStyles();
const { t } = useTranslation();
Class InMemoryKeyValueDatabaseTests
has 40 methods (exceeds 20 allowed). Consider refactoring. Open
public class InMemoryKeyValueDatabaseTests
{
private readonly InMemoryKeyValueData _data = new();
private readonly InMemoryKeyValueDatabase _database;
Function configureEndpoints
has 112 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function configureEndpoints(app: Express, conferenceManager: ConferenceManager): void {
app.use(express.json());
app.use(jwt({ algorithms: ['HS256'], secret: config.services.tokenSecret }));
app.use(cors());
Function useMedia
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
export default function useMedia(
source: ProducerSource,
getMediaTrack: (deviceId?: string) => Promise<MediaStreamTrack>,
options?: Partial<ProducerOptions> | ((track: MediaStreamTrack) => Partial<ProducerOptions>),
): UseMediaState {
- 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 ApplyBreakoutRoomUseCaseTests.cs
has 335 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
Function DiagnosticsView
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function DiagnosticsView() {
const participantsOfRoom = useSelector(selectParticipantsOfCurrentRoom);
const participants = useSelector(selectParticipantList);
const participantMap = useSelector(selectParticipants);
Function MediaFab
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
export default function MediaFab({
Icon,
pauseOnToggle,
control: { enable, disable, pause, resume, enabled, paused },
translationKey,
- 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 useMedia
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function useMedia(
source: ProducerSource,
getMediaTrack: (deviceId?: string) => Promise<MediaStreamTrack>,
options?: Partial<ProducerOptions> | ((track: MediaStreamTrack) => Partial<ProducerOptions>),
): UseMediaState {
Function middleware
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
const middleware: Middleware = () => {
const activeToasts = new Map<string, ActiveToast[]>();
const addToastHandler = (info: ActiveToast) => {
const list = activeToasts.get(info.actionType) ?? [];
Function Equipment
has 96 lines of code (exceeds 25 allowed). Consider refactoring. Open
export default function Equipment() {
const dispatch = useDispatch();
const classes = useStyles();
const executingCommands = useRef(new Set<number>());
File SceneTests.cs
has 322 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.SignalR.Client;
File WhiteboardTests.cs
has 319 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.JsonPatch;
File TabCommon.tsx
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
Box,
Checkbox,
Collapse,
FormControl,
Function updateParticipant
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
async updateParticipant(participant: Participant): Promise<void> {
const status = this.participantStatus.get(participant.participantId);
if (status) {
logger.info('updateParticipant() | participantId: %s | roomId: %s', participant.participantId, this.id);
- 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 Whiteboard
has a Cognitive Complexity of 25 (exceeds 5 allowed). Consider refactoring. Open
export default function Whiteboard({
canvas,
onPushAction,
canUndo,
onUndo,
- 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 whiteboard-controller.ts
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { fabric } from 'fabric';
import { IEvent } from 'fabric/fabric-impl';
import jsonPatch from 'fast-json-patch';
import _ from 'lodash';
import {
File PollTests.cs
has 305 lines of code (exceeds 250 allowed). Consider refactoring. Open
using System.Linq;
using System.Threading.Tasks;
using MediatR;
using Microsoft.AspNetCore.SignalR.Client;
using Strive.Core.Errors;