You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Annotate them with warnings in code review to more closely scrutinize the logic that interacts with the variable.
Rationale
I see a lot of abuse for empty strings. It makes code logic sloppy and more error prone. But since there are some legitimate uses for empty strings, we will just set a warning instead of error?
Should be unset (which implies undefined) instead of passing an empty string as a credential or URL. Then the code should check if the value is truthy before expecting authentication.
Annotate them with warnings in code review to more closely scrutinize the logic that interacts with the variable.
Rationale
I see a lot of abuse for empty strings. It makes code logic sloppy and more error prone. But since there are some legitimate uses for empty strings, we will just set a warning instead of error?
Examples
https://github.com/ubiquity/audit.ubq.fi/blob/08fba85a9a592ca2bda5eaeaa2ff3b9fdd4632be/static/scripts/audit-report/audit.ts#L26C1-L27C21
undefined
) instead of passing an empty string as a credential or URL. Then the code should check if the value is truthy before expecting authentication.https://github.com/ubiquity/ubiquibot-kernel/blame/c553d5a7866c1ef76d4f589d8095c8bb751cbd49/src/github/types/config.ts#L29
value.ref ?? "@" + value.ref
as I'm assuming the developer never expected the""
value to be returned there.https://github.com/ubiquity/pay.ubq.fi/pull/189/files#r1518549017
From codebase search: https://github.com/search?q=org%3Aubiquity+%5C%22%5C%22+language%3ATypeScript&type=code
The text was updated successfully, but these errors were encountered: