Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Resolve all the warnings outputted in the following page.
https://pareview.sh/pareview/https-git.drupal.org-project-cloud.git
Comment | File | Size | Author |
---|---|---|---|
#34 | warning_unused_use_statement-3014131-34.patch | 9.79 KB | shidat |
| |||
#33 | error_inline_comment_must_end-3014131-33.patch | 51.72 KB | shidat |
| |||
#23 | warning_unused_variable-3014131_23.patch | 8.22 KB | shidat |
| |||
#21 | error_comments_not_appear-3014131_21.patch | 3.93 KB | shidat |
| |||
#20 | error_case_breaking-3014131_20.patch | 7.39 KB | shidat |
|
Comments
Comment #2
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #3
shidat CreditAttribution: shidat commentedAdd the patch for suppress warning.
The patch file 3014131_except_php_files.patch resolve the notices about the files except PHP files.
Comment #4
shidat CreditAttribution: shidat commentedTo avoid "Case breaking statements must be followed by a single blank line" errors.
Comment #5
shidat CreditAttribution: shidat commentedRemove unused "use statement"
Comment #6
shidat CreditAttribution: shidat commentedRemove unused variables.
Comment #7
yas@shidat
Thank you for the patches.
3014131_warning_unused_use_statement.patch
)3014131_except_php_files.patch
to delete JS file(s) such ascloud.auto_refresh_list_all_instances.js
as future reference.3014131_warning_unused_variable.patch
.Original:
Patch:
It would be appreciated if you can write the test code for it.
@baldwinlouie
Could you please confirm about the patches?
Comment #8
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #9
shidat CreditAttribution: shidat commented1. The patches in between comment #4 and #5 are identical?
oops, It is my mistake. duplicate.
guan-san upload correct patch file.
2. I'm concerned 3014131_except_php_files.patchto delete JS file(s) ...
OK, I'll resume the JS.
3. I'm not confident whether the following change is really valid or not ...
In this code, there is no appearance $key in loop block. So, no need to store the loop index at $key variable, I think.
Comment #10
shidat CreditAttribution: shidat commentedThere should be no white space after an opening “{”
Comment #11
shidat CreditAttribution: shidat commentedComments may not appear after statements
Comment #12
shidat CreditAttribution: shidat commentedInline comments must end in full-stops, exclamation | | marks, colons, question marks, or closing parentheses
Comment #13
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #14
yas@shidat
Thank you for more patches.
My comments are here (I put the patch name in each item.)
3014131_warning_unused_use_statement.patch
: The patches in between comment #4 and #5 are identical?→ OK, it looks good to me.
3014131_except_php_files.patch
: I'm concerned to delete JS file(s) such ascloud.auto_refresh_list_all_instances.js
as future reference.→ I mean that we should leave the one(s) as it is? (I want to get @baldwinlouie's feedback
3014131_warning_unused_variable.patch
: I'm not confident whether the following change is really valid or not in the patch.→ I understand that waning by the tool, however I meant that I wanted you to make sure if it makes the same result in the following code since it is different in PHP between
foreach ($array as $variable)
andforeach ($array as $key => $value)
even though $key is not used later. It would be appreciated if you can write the test code for it.3014131_error_case_breaking.patch
: Looks fine to me butaws_cloud.tokens.inc
can be deleted in this patch??3014131_warning_no_white_space_after.patch
: This is fine to me.3014131_error_comments_not_appear.patch
://12 digits
→// 12 digits
. Also, I think// @TODO
comment line can be deleted (Need to get @baldwinlouie's feedback)3014131_error_inline_comment_must_end.patch
: Let's start an UPPER case at the beginning of the comment; put one space after//
. Please put a period (.
) in a header like// Updated YYYY/mm/dd <username>
By the way, FYI I think the patch name should be
[description]-[issue-number]-[comment-number].patch
.Comment #15
yasComment #16
shidat CreditAttribution: shidat commentedERROR | Inline comments must end in full-stops, exclamation | | marks, colons, question marks, or closing parentheses
Sorry, I mistake the uploaded patch. Correct one is attach on #17
Comment #17
shidat CreditAttribution: shidat commentedERROR | Closing parenthesis of array declaration must be on a new line
Comment #18
shidat CreditAttribution: shidat commentedERROR | Missing function doc comment
Comment #19
shidat CreditAttribution: shidat commentedApply comment #14
3014131_except_php_files.patch: I'm concerned to delete JS file(s) such as cloud.auto_refresh_list_all_instances.js as future reference.
→ I mean that we should leave the one(s) as it is? (I want to get @baldwinlouie's feedback
Comment #20
shidat CreditAttribution: shidat commentedPrevious patch name is "3014131_error_case_breaking.patch"
Apply the comment.
3014131_error_case_breaking.patch: Looks fine to me but aws_cloud.tokens.inc can be deleted in this patch??
Comment #21
shidat CreditAttribution: shidat commentedPrevious patch name is "3014131_error_comments_not_appear.patch"
Apply comment.
3014131_error_comments_not_appear.patch: //12 digits→// 12 digits. Also, I think // @TODO comment line can be deleted (Need to get @baldwinlouie's feedback)
Comment #22
shidat CreditAttribution: shidat commented3014131_error_inline_comment_must_end.patch: Let's start an UPPER case at the beginning of the comment; put one space after //. Please put a period (.) in a header like // Updated YYYY/mm/dd
Comment #23
shidat CreditAttribution: shidat commentedAdd unit test case for the modification.
3014131_warning_unused_variable.patch: I'm not confident whether the following change is really valid or not in the patch.
→ I understand that waning by the tool, however I meant that I wanted you to make sure if it makes the same result in the following code since it is different in PHP between foreach ($array as $variable) and foreach ($array as $key => $value) even though $key is not used later. It would be appreciated if you can write the test code for it.
Comment #24
yasCleaned up the existing (old) patches
Comment #25
yas@shidat
@xiaohua-guan
We reviewed the patches. I'll merge the ones. Thank you for your contributions.
Comment #32
yas@shidat
After I applied the following patches successfully, I couldn't apply
error_inline_comment_must_end-3014131_22.patch
and3014131_warning_unused_use_statement.patch
.error_closing_parenthesis_of_array_3014131_17.patch
error_missing_function_doc-3014131_18.patch
except_php_files-3014131_19.patch
error_case_breaking-3014131_20.patch
error_comments_not_appear-3014131_21.patch
warning_unused_variable-3014131_23.patch
Could you please make it work again?
Comment #33
shidat CreditAttribution: shidat commentedI modified the patch files. They can be applied now. Please try the new patch files.
Comment #34
shidat CreditAttribution: shidat commented> I couldn't apply error_inline_comment_must_end-3014131_22.patch and 3014131_warning_unused_use_statement.patch.
Comment #35
Xiaohua Guan CreditAttribution: Xiaohua Guan commentedComment #37
yas@shidat
@xiaohua-guan
I reviewed the patches and looks fine. Thank you for your fixes. I'll merge the following ones.
error_inline_comment_must_end-3014131-33.patch
andwarning_unused_use_statement-3014131-34.patch
Comment #40
yasPlease let us close this issue once. Let's create another issue for further fixes.
Comment #41
yasComment #42
yas