You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/11/30 12:30:43 UTC

[GitHub] [servicecomb-service-center] lilai23 opened a new pull request #770: static check and clear in the syncer folder

lilai23 opened a new pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770


   static check and clear in the syncer folder


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533016272



##########
File path: .github/workflows/golangci-lint.yml
##########
@@ -10,4 +10,4 @@ jobs:
         uses: golangci/golangci-lint-action@v2
         with:
           version: v1.29
-          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,syncer,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$
\ No newline at end of file
+          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$

Review comment:
       --enable golint,gocyclo,goimports指定开启哪些,你可以多开一些,本地的也都加上去




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] lilai23 commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
lilai23 commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533332970



##########
File path: .github/workflows/golangci-lint.yml
##########
@@ -10,4 +10,4 @@ jobs:
         uses: golangci/golangci-lint-action@v2
         with:
           version: v1.29
-          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,syncer,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$
\ No newline at end of file
+          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$

Review comment:
       > 增加deadcode errcheck gosimple ineffassign
   
   syncer代码整改已完成,golangci-lint配置文件已去除syncer




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] lilai23 commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
lilai23 commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533977813



##########
File path: syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter/servicecenter.go
##########
@@ -114,7 +114,7 @@ func Do(ctx context.Context, method, addr string, headers http.Header, body []by
 	if err != nil {
 		return nil, err
 	}
-	endpoints, err := serverNameToEndpoints(raw.Hostname())
+	endpoints, _ := serverNameToEndpoints(raw.Hostname())

Review comment:
       已修改




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533016505



##########
File path: .github/workflows/golangci-lint.yml
##########
@@ -10,4 +10,4 @@ jobs:
         uses: golangci/golangci-lint-action@v2
         with:
           version: v1.29
-          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,syncer,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$
\ No newline at end of file
+          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$

Review comment:
       增加deadcode errcheck gosimple ineffassign 




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] tianxiaoliang commented on pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#issuecomment-735759808


   在清理完后,请改下syncer目录在golanglint ci配置文件中的白名单


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] tianxiaoliang commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
tianxiaoliang commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533966180



##########
File path: syncer/samples/multi-servicecenters/servicecenter/hello-server/servicecenter/servicecenter.go
##########
@@ -114,7 +114,7 @@ func Do(ctx context.Context, method, addr string, headers http.Header, body []by
 	if err != nil {
 		return nil, err
 	}
-	endpoints, err := serverNameToEndpoints(raw.Hostname())
+	endpoints, _ := serverNameToEndpoints(raw.Hostname())

Review comment:
       为何忽略错误




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] lilai23 commented on pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
lilai23 commented on pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#issuecomment-735767956


   > > 在清理完后,请改下syncer目录在golanglint ci配置文件中的白名单
   > 
   > 我本地golangci-lint开启了deadcode errcheck gosimple govert四项,貌似github上门禁和我本地配置不同,还有一些没有通过检查,请问具体配置是怎样的
   
   从check结果上看应该还有 ineffassign staticcheck structcheck golint 这个几个需要打开


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] lilai23 commented on pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
lilai23 commented on pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#issuecomment-735765591


   > 在清理完后,请改下syncer目录在golanglint ci配置文件中的白名单
   
   我本地golangci-lint开启了deadcode errcheck gosimple govert四项,貌似github上门禁和我本地配置不同,还有一些没有通过检查,请问具体配置是怎样的


----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] GuoYL123 commented on a change in pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
GuoYL123 commented on a change in pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770#discussion_r533023216



##########
File path: .github/workflows/golangci-lint.yml
##########
@@ -10,4 +10,4 @@ jobs:
         uses: golangci/golangci-lint-action@v2
         with:
           version: v1.29
-          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,syncer,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$
\ No newline at end of file
+          args: --timeout=5m --skip-dirs='test,pkg/registry,.*/controller/(v3|v4)$,.*/bootstrap$,server/broker/brokerpb,examples,frontend,scctl,integration' --out-format=colored-line-number --enable golint,gocyclo,goimports --skip-files=.*_test.go$

Review comment:
       这个单独PR分开提交吧,估计会改大量的代码,不好追踪




----------------------------------------------------------------
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



[GitHub] [servicecomb-service-center] tianxiaoliang merged pull request #770: static check and clear in the syncer folder

Posted by GitBox <gi...@apache.org>.
tianxiaoliang merged pull request #770:
URL: https://github.com/apache/servicecomb-service-center/pull/770


   


----------------------------------------------------------------
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