Skip to content

Commit

Permalink
Remove ternary in log message
Browse files Browse the repository at this point in the history
  • Loading branch information
samayer12 committed Dec 11, 2024
1 parent 0917da5 commit a98fdd9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/filter/filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export function shouldSkipRequest(
) :

mismatchedName(binding, obj) ?
`${prefix} Binding defines name '${definedName(binding)}' but Object carries '${carriedName(obj ?? {})}'.` :
`${prefix} Binding defines name '${definedName(binding)}' but Object carries '${carriedName(obj)}'.` :

mismatchedGroup(binding, req) ?
(
Expand Down Expand Up @@ -100,44 +100,44 @@ export function shouldSkipRequest(

uncarryableNamespace(capabilityNamespaces, obj) ?
(
`${prefix} Object carries namespace '${carriedNamespace(obj ?? {})}' ` +
`${prefix} Object carries namespace '${carriedNamespace(obj)}' ` +
`but namespaces allowed by Capability are '${JSON.stringify(capabilityNamespaces)}'.`
) :

mismatchedNamespace(binding, obj) ?
(
`${prefix} Binding defines namespaces '${JSON.stringify(definedNamespaces(binding))}' ` +
`but Object carries '${carriedNamespace(obj ?? {})}'.`
`but Object carries '${carriedNamespace(obj)}'.`
) :

mismatchedLabels(binding, obj) ?
(
`${prefix} Binding defines labels '${JSON.stringify(definedLabels(binding))}' ` +
`but Object carries '${JSON.stringify(carriedLabels(obj ?? {}))}'.`
`but Object carries '${JSON.stringify(carriedLabels(obj))}'.`
) :

mismatchedAnnotations(binding, obj) ?
(
`${prefix} Binding defines annotations '${JSON.stringify(definedAnnotations(binding))}' ` +
`but Object carries '${JSON.stringify(carriedAnnotations(obj ?? {}))}'.`
`but Object carries '${JSON.stringify(carriedAnnotations(obj))}'.`
) :

mismatchedNamespaceRegex(binding, obj) ?
(
`${prefix} Binding defines namespace regexes ` +
`'${JSON.stringify(definedNamespaceRegexes(binding))}' ` +
`but Object carries '${carriedNamespace(obj ?? {})}'.`
`but Object carries '${carriedNamespace(obj)}'.`
) :

mismatchedNameRegex(binding, obj) ?
(
`${prefix} Binding defines name regex '${definedNameRegex(binding)}' ` +
`but Object carries '${carriedName(obj ?? {})}'.`
`but Object carries '${carriedName(obj)}'.`
) :

carriesIgnoredNamespace(ignoredNamespaces, obj) ?
(
`${prefix} Object carries namespace '${carriedNamespace(obj ?? {})}' ` +
`${prefix} Object carries namespace '${carriedNamespace(obj)}' ` +
`but ignored namespaces include '${JSON.stringify(ignoredNamespaces)}'.`
) :

Expand Down

0 comments on commit a98fdd9

Please sign in to comment.