Showing 250 of 735 total issues
Function onLiveUpdateReceived
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private onLiveUpdateReceived(update: WhiteboardLiveUpdateDto) {
if (!this.currentCanvas) return;
if (update.action.type === 'end') {
this.removeLiveUpdate(update.participantId);
- 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 index
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function index({ conference }: Props) {
const userInteractionMade = useSelector((state: RootState) => state.media.userInteractionMade);
const playSoundOnConferenceOpen = useSelector((state: RootState) => state.settings.obj.conference.playSoundOnOpen);
const myId = useMyParticipantId();
- 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 removeConnection
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
public async removeConnection(connectionId: string): Promise<SuccessOrError> {
const connection = this.connections.get(connectionId);
if (!connection) return { success: false, error: errors.connectionNotFound(connectionId) };
this.connections.delete(connection.connectionId);
- 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 ErrorWrapper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function ErrorWrapper({ failed, children, error, onRetry, type = 'alert' }: Props) {
const classes = useStyles();
const { t } = useTranslation();
return failed ? (
- 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 apply
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
apply(fc: fabric.Canvas, action: ModifyingObjectsCanvasLiveAction, currentCanvas: WhiteboardCanvas): void {
const objects = fc.getObjects();
const previousEdited = [...this.modifiedObjs];
this.modifiedObjs = [];
- 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 WebcamSettingsTest
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function WebcamSettingsTest() {
const classes = useStyles();
const myId = useMyParticipantId();
const { t } = useTranslation();
const consumer = useConsumer(myId, 'loopback-webcam');
- 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 EquipmentRoute
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function EquipmentRoute({
location,
match: {
params: { 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 clearChat
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
clearChat(state) {
if (state.channels) {
for (const channel of Object.values(state.channels)) {
if (channel.viewModel) channel.viewModel.messages = [];
}
- 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 unregisterConsumer
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
private unregisterConsumer(id: string): void {
log('Unregister consumer %s', id);
let currentUsage = this.consumerUsage.get(id);
if (currentUsage === undefined) {
- 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 onMouseDown
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
onMouseDown(event: IEvent): void {
if (event.target) return;
const canvas = this.getCanvas();
if (canvas.getActiveObject()) return;
- 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"