OpenWebhook/webhook-store

View on GitHub

Showing 1 of 18 total issues

Function getHostnameOrLocalhost has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
Open

export const getHostnameOrLocalhost = (host: option.Option<string>): string => {
if (option.isNone(host)) {
return 'localhost';
} else {
if (host.value.includes('localhost:')) {
Severity: Minor
Found in src/helpers/get-hostname/get-hostname.helper.ts - About 35 mins to fix
Severity
Category
Status
Source
Language