You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/07/16 12:39:31 UTC

[pulsar-client-go] branch master updated: Add golangci-lint for formatting code (#21)

This is an automated email from the ASF dual-hosted git repository.

sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-client-go.git


The following commit(s) were added to refs/heads/master by this push:
     new c53f30d  Add golangci-lint for formatting code (#21)
c53f30d is described below

commit c53f30d1a177db49f89ee5fa2cc8b04f3ce7354e
Author: 冉小龙 <ra...@gmail.com>
AuthorDate: Tue Jul 16 20:39:27 2019 +0800

    Add golangci-lint for formatting code (#21)
    
    * Add golangci-lint for formatting code
---
 .golangci.yml | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/.golangci.yml b/.golangci.yml
new file mode 100644
index 0000000..272cc9a
--- /dev/null
+++ b/.golangci.yml
@@ -0,0 +1,30 @@
+# Make sure golangci-lint is installed.
+# https://github.com/golangci/golangci-lint#install
+# We can execute `golangci-lint run` for code checking.
+run:
+  tests: true
+  skip-dirs:
+    - _examples
+
+output:
+  print-issued-lines: false
+
+linters:
+  enable-all: true
+  disable:
+    - maligned
+    - megacheck
+    - lll
+    - gocyclo
+    - gochecknoglobals
+
+linters-settings:
+  govet:
+    check-shadowing: true
+  gocyclo:
+    min-complexity: 10
+  dupl:
+    threshold: 100
+  goconst:
+    min-len: 8
+    min-occurrences: 3