-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Empty String ""
Code Review Warning Annotation
#31
Comments
/start |
Tips:
|
/stop if it is still an open task I will pick it back up. Feel free to ref my PR if anyone wants to take this |
+ You have been unassigned from the task |
/start |
Tips:
|
# These linked pull requests are closed: <a href="https://github.com/ubiquity/ts-template/pull/36">#36</a> |
/start |
Tips:
|
@jordan-ae, this task has been idle for a while. Please provide an update. |
/stop |
# These linked pull requests are closed: https://github.com/ubiquity/ts-template/pull/57 |
! You have reached your max task limit. Please close out some tasks before assigning new ones. |
! Failed to run comment evaluation. TypeError: Cannot read properties of undefined (reading 'wordValue') |
! You have reached your max task limit. Please close out some tasks before assigning new ones. |
! You have reached your max task limit. Please close out some tasks before assigning new ones. |
1 similar comment
! You have reached your max task limit. Please close out some tasks before assigning new ones. |
! Failed to run comment evaluation. TypeError: Cannot read properties of undefined (reading 'wordValue') |
@0x4007 the deadline is at Wed, Oct 9, 2:18 AM UTC |
! Failed to run comment evaluation. TypeError: Cannot read properties of undefined (reading 'wordValue') |
@gentlementlegen can you fix today and leverage Whilefoo environment config switcher |
|
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1 | 100 |
Issue | Specification | 1 | 55.92 |
Issue | Comment | 1 | 0.154 |
Review | Comment | 5 | 0 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
Annotate them with warnings in code review to more closely scrut… | 18.64content: content: p: score: 0 elementCount: 2 h3: score: 1 elementCount: 2 h6: score: 1 elementCount: 4 ul: score: 1 elementCount: 3 li: score: 0.5 elementCount: 3 hr: score: 0 elementCount: 1 result: 10.5 regex: wordCount: 177 wordValue: 0.1 result: 8.14 | 1 | 55.92 |
@gentlementlegen can you fix today and leverage Whilefoo enviro… | 0.77content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 11 wordValue: 0.1 result: 0.77 | 0.2 | 0.154 |
Resolves https://github.com/ubiquity/ts-template/issues/31Curr… | 0content: content: p: score: 0 elementCount: 3 result: 0 regex: wordCount: 67 wordValue: 0 result: 0 | 0.8 | 0 |
I got annotations working on the files view but I can't get the … | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 19 wordValue: 0 result: 0 | 0.4 | 0 |
Currently matches any instance of `""` but with regex ca… | 0content: content: p: score: 0 elementCount: 2 result: 0 regex: wordCount: 43 wordValue: 0 result: 0 | 0.7 | 0 |
It's a warning not an error. This expresses that the reviewers s… | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 59 wordValue: 0 result: 0 | 0.6 | 0 |
Also I just realized that it doesn't display annotations on GitH… | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 26 wordValue: 0 result: 0 | 0.3 | 0 |
[ 1.192 WXDAI ]
@gentlementlegen
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Review | Comment | 1 | 1.192 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@0x4007 It seems you merged this with empty strings: https://git… | 1.49content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 24 wordValue: 0.1 result: 1.49 | 0.8 | 1.192 |
|
View | Contribution | Count | Reward |
---|---|---|---|
Issue | Task | 1 | 100 |
Issue | Specification | 1 | 55.92 |
Issue | Comment | 1 | 0.231 |
Review | Comment | 5 | 0 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
Annotate them with warnings in code review to more closely scrut… | 18.64content: content: p: score: 0 elementCount: 2 h3: score: 1 elementCount: 2 h6: score: 1 elementCount: 4 ul: score: 1 elementCount: 3 li: score: 0.5 elementCount: 3 hr: score: 0 elementCount: 1 result: 10.5 regex: wordCount: 177 wordValue: 0.1 result: 8.14 | 1 | 55.92 |
@gentlementlegen can you fix today and leverage Whilefoo enviro… | 0.77content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 11 wordValue: 0.1 result: 0.77 | 0.3 | 0.231 |
Resolves https://github.com/ubiquity/ts-template/issues/31Curr… | 0content: content: p: score: 0 elementCount: 3 result: 0 regex: wordCount: 67 wordValue: 0 result: 0 | 0.8 | 0 |
I got annotations working on the files view but I can't get the … | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 19 wordValue: 0 result: 0 | 0.5 | 0 |
Currently matches any instance of `""` but with regex ca… | 0content: content: p: score: 0 elementCount: 2 result: 0 regex: wordCount: 43 wordValue: 0 result: 0 | 0.7 | 0 |
It's a warning not an error. This expresses that the reviewers s… | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 59 wordValue: 0 result: 0 | 0.6 | 0 |
Also I just realized that it doesn't display annotations on GitH… | 0content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 26 wordValue: 0 result: 0 | 0.4 | 0 |
[ 1.192 WXDAI ]
@gentlementlegen
Contributions Overview
View | Contribution | Count | Reward |
---|---|---|---|
Review | Comment | 1 | 1.192 |
Conversation Incentives
Comment | Formatting | Relevance | Reward |
---|---|---|---|
@0x4007 It seems you merged this with empty strings: https://git… | 1.49content: content: p: score: 0 elementCount: 1 result: 0 regex: wordCount: 24 wordValue: 0.1 result: 1.49 | 0.8 | 1.192 |
@0x4007 I should have tested this, but it will always crash if a user opens a pull request because it uses variables from secrets that are not accessible, I will fix that. |
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: