-
Notifications
You must be signed in to change notification settings - Fork 142
CORTX-30751: This patch fixes some of the codacy warnings. #2057
CORTX-30751: This patch fixes some of the codacy warnings. #2057
Conversation
warning fixed : "Double quote to prevent globing and words splitting". Co-authored-by: Venkatesh Balagani <[email protected]> Signed-off-by: Gaurav Gaur <[email protected]>
|
Ran Lnet sanity & Test passed: This script [/opt/seagate/cortx/motr/sanity/cortx_lnet_sanity.sh] will take the following actions [MSG] Collecting RPM list [MSG] RPM list collected [MSG] LNET component [kmod-lustre-client] is installed. [MSG] LNET component [lustre-client] is installed. [MSG] LNET conf file found here /etc/modprobe.d/lnet.conf [MSG] LNET conf file found here /etc/modprobe.d/lnet.conf is not empty. [MSG] Found configured device: [eth1] [MSG] Configured device: [eth1] has address [192.168.53.119]. [MSG] IP_ADDR [192.168.53.119] is a valid and reachable IP address [MSG] NID [192.168.53.119@tcp] found device [eth1] IP [192.168.53.119] [MSG] Terminating with RESULT [0]. |
|
@upendrapatwardhan @kanchan-chaudhari Can you please review this PR? |
kanchan-chaudhari
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks Good.
| verify_lnet_conf_data() | ||
| { | ||
| local RESULT=$ERR_LNET_BAD_CONF_DATA | ||
| local RESULT=${ERR_LNET_BAD_CONF_DATA} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ERR_LNET_BAD_CONF_DATA and ${ERR_LNET_BAD_CONF_DATA} are two different ways to reference a variable.
What is the reason to change this?
If you want to change this, we need to change all places. But this patch only changes some of them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the commit message is to remove the "double quoting" problem.
this kind of error/warning is not mentioned in the commit log.
Is this a real warning or error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ERR_LNET_BAD_CONF_DATAand${ERR_LNET_BAD_CONF_DATA}are two different ways to reference a variable.What is the reason to change this? If you want to change this, we need to change all places. But this patch only changes some of them.
Changed as per suggestion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And the commit message is to remove the "double quoting" problem. this kind of error/warning is not mentioned in the commit log. Is this a real warning or error?
Updated the statement with other issues as well. Thanks
|
This issue/pull request has been marked as |
Signed-off-by: Gaurav Gaur <[email protected]>
) Problem: We see 1688 occurrences of the pattern, "Double quote to prevent globing and word splitting". And issues like Use $(...) notation instead of legacy backticked .... Solution: We are putting the variable references in double-quotes. Also fixed issues like Use $(...) notation instead of legacy backticked .... Signed-off-by: Gaurav Gaur <[email protected]> Co-authored-by: Venkatesh Balagani <[email protected]>
This patch fixes some of the Codacy warnings.
warning fixed: "Double quote to prevent globing and words splitting and issues like $(...)".
Co-authored-by: Venkatesh Balagani [email protected]
Signed-off-by: Gaurav Gaur [email protected]
Problem Statement
....Design
....Coding
Checklist for Author
Testing
Checklist for Author
Impact Analysis
Checklist for Author/Reviewer/GateKeeper
Review Checklist
Checklist for Author
Documentation
Checklist for Author