refactor: start_docker()#1410
Merged
prashant-shahi merged 5 commits intoSigNoz:developfrom Jul 20, 2022
AkshayAwate:develop
Merged
refactor: start_docker()#1410prashant-shahi merged 5 commits intoSigNoz:developfrom AkshayAwate:develop
prashant-shahi merged 5 commits intoSigNoz:developfrom
AkshayAwate:develop
Conversation
prashant-shahi
suggested changes
Jul 17, 2022
Contributor
prashant-shahi
left a comment
There was a problem hiding this comment.
Thanks for the pull request!
Can you also address similar ones in line number 268, 272 and 290?
[Line 268:](javascript:setPosition(268, 15))
if (( $EUID != 0 )); then
^-- [SC2004](https://www.shellcheck.net/wiki/SC2004) (style): $/${} is unnecessary on arithmetic variables.
[Line 272:](javascript:setPosition(272, 19))
if [[ $? -ne 0 ]] && ! $sudo_cmd -v; then
^-- [SC2181](https://www.shellcheck.net/wiki/SC2181) (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.
[Line 290:](javascript:setPosition(290, 7))
if (( $EUID != 0 )); then
^-- [SC2004](https://www.shellcheck.net/wiki/SC2004) (style): $/${} is unnecessary on arithmetic variables.
[Line 307:](javascript:setPosition(307, 7))
if [[ $? -ne 0 ]]; then
^-- [SC2181](https://www.shellcheck.net/wiki/SC2181) (style): Check exit code directly with e.g. 'if ! mycmd;', not indirectly with $?.
Contributor
Author
|
@prashant-shahi since there is no arithmatic calculation involved using |
|
Kudos, SonarCloud Quality Gate passed! |
Contributor
|
@AkshayAwate |
prashant-shahi
approved these changes
Jul 20, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.









Running a command and then checking its exit status with
$?against 0 is redundant.More info can be found: https://www.shellcheck.net/wiki/SC2181
If this is good to go, then we can refactor other functions code too.
Thanks