You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2019/12/20 03:14:06 UTC

[GitHub] [pulsar-client-go] wolfstudy opened a new pull request #138: Enable golangci lint for project

wolfstudy opened a new pull request #138: Enable golangci lint for project
URL: https://github.com/apache/pulsar-client-go/pull/138
 
 
   Signed-off-by: xiaolong.ran <rx...@apache.org>
   
   ### Modifications
   
   Enable golangci lint for project, checks as follows:
   
   ```
       - bodyclose
       - deadcode
       - gocritic
       - goimports
       - golint
       - gosimple
       - govet
       - ineffassign
       - interfacer
       - misspell
       - staticcheck
       - structcheck
       - stylecheck
       - typecheck
       - unconvert
       - unparam
       - unused
       - varcheck
       - lll
       - prealloc
       - maligned
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on issue #138: Enable golangci lint for project

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #138: Enable golangci lint for project
URL: https://github.com/apache/pulsar-client-go/pull/138#issuecomment-568147595
 
 
   - `if` block ends with a `return` statement, so drop this `else` and outdent its block (golint)
   
   ```
   if err != nil {
   		return nil, err
   	} else {
   		return internal.NewBufferWrapper(uncompressed), nil
   	}
   ```
   
   - comment on exported var `FlagProfile` should be of the form `FlagProfile ...` (golint)
   
   ```
   // global flags
   var FlagProfile bool
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on issue #138: Enable golangci lint for project

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on issue #138: Enable golangci lint for project
URL: https://github.com/apache/pulsar-client-go/pull/138#issuecomment-568653577
 
 
   @merlimat PTAL thanks
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy commented on a change in pull request #138: Enable golangci lint for project

Posted by GitBox <gi...@apache.org>.
wolfstudy commented on a change in pull request #138: Enable golangci lint for project
URL: https://github.com/apache/pulsar-client-go/pull/138#discussion_r360747623
 
 

 ##########
 File path: run-ci.sh
 ##########
 @@ -29,6 +29,10 @@ go mod download
 go build ./pulsar
 go build -o pulsar-perf ./perf
 
+# Project code style check
+wget -O - -q https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.18.0
 
 Review comment:
   Good idea @merlimat, has been fixed, please take a look again, thanks.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] wolfstudy merged pull request #138: Enable golangci lint for project

Posted by GitBox <gi...@apache.org>.
wolfstudy merged pull request #138: Enable golangci lint for project
URL: https://github.com/apache/pulsar-client-go/pull/138
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services