• Stars
    star
    128
  • Rank 281,044 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 11 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

checkstyle for go

go-checkstyle

Build Status

checkstyle is a style check tool like java checkstyle. This tool inspired by java checkstyle, golint. The style refered to some points in Go Code Review Comments.

Install

go get github.com/qiniu/checkstyle/gocheckstyle

Run

gocheckstyle -config=.go_style dir1 dir2

Config

config is json file like the following:

{
    "file_line": 500,
    "func_line": 50,
    "params_num":4,
    "results_num":3,
    "formated": true,
    "pkg_name": true,
    "camel_name":true,
    "ignore":[
        "a/*",
        "b/*/c/*.go"
    ],
    "fatal":[
        "formated"
    ]
}

Add to makefile

check_go_style:
	bash -c "mkdir -p checkstyle; cd checkstyle && export GOPATH=`pwd` && go get github.com/qiniu/checkstyle/gocheckstyle"
	checkstyle/bin/gocheckstyle -config=.go_style dir1 dir2

Integrate with jenkins checkstyle plugin

excute in shell

    mkdir -p checkstyle; cd checkstyle && export GOPATH=`pwd` && go get github.com/qiniu/checkstyle/gocheckstyle"
    checkstyle/bin/gocheckstyle -reporter=xml -config=.go_style dir1 dir2 2>gostyle.xml

then add postbuild checkstyle file gostyle.xml

Run checkstyle with one or more filenames or directories. The output of this tool is a list of suggestions. If you need to force obey the rule, place it in fatal.

Checkstyle's difference with other tools

Checkstyle differs from gofmt. Gofmt reformats Go source code, whereas checkstyle prints out coding style suggestion.

Checkstyle differs from golint. Checkstyle check file line/function line/param number, could be configed by user.

More Repositories

1

js-sdk

Qiniu Cloud JavaScript SDK
JavaScript
1,378
star
2

logkit

Very powerful server agent for collecting & sending logs & metrics with an easy-to-use web console.
Go
1,350
star
3

qmgo

Qmgo - The Go driver for MongoDB. It‘s based on official mongo-go-driver but easier to use like Mgo.
Go
1,297
star
4

qshell

Shell Tools for Qiniu Cloud
Go
980
star
5

php-sdk

Qiniu Resource (Cloud) Storage SDK for PHP
PHP
810
star
6

goc

A Comprehensive Coverage Testing System for The Go Programming Language
Go
796
star
7

httptest

Qiniu httptest utilities
Go
635
star
8

android-sdk

Qiniu Resource (Cloud) Storage SDK for Android
Java
626
star
9

nodejs-sdk

Qiniu Resource (Cloud) Storage SDK for Node.js
JavaScript
587
star
10

java-sdk

Qiniu Resource (Cloud) Storage SDK for Java
Java
549
star
11

python-sdk

Qiniu Resource (Cloud) Storage SDK for Python
Python
543
star
12

happy-dns-objc

dns library for objective c
Objective-C
491
star
13

iconv

Golang bindings to libiconv - Convert string to requested character encoding
Go
474
star
14

objc-sdk

Qiniu Resource (Cloud) Storage Objective-C SDK for Mac/iOS
Objective-C
436
star
15

arch

极客时间专栏《许式伟的架构课》相关的源代码:冯诺伊曼结构
Go
407
star
16

cerl

CERL2.0 - Erlang Model for C++
C++
376
star
17

gobook

The Go Programming Language
Go
362
star
18

py

Golang bindings to the CPython C-API
Go
319
star
19

qetag

qetag
Erlang
316
star
20

happy-dns-android

dns library for android
Java
293
star
21

QSunSync

七牛云文件同步图形化工具-Windows版本
C#
271
star
22

api.v7

Qiniu SDK for Golang (v7.x)
Go
264
star
23

csharp-sdk

Qiniu Resource (Cloud) Storage SDK for C#
C#
176
star
24

qpaint

极客时间专栏《许式伟的架构课》相关的源代码:QPaint (画图程序)
JavaScript
170
star
25

ruby-sdk

Qiniu Resource (Cloud) Storage SDK for Ruby
Ruby
164
star
26

kodo-browser

Kodo Browser 为七牛对象存储(Kodo)提供类似 Windows 资源管理器的功能。用户可以很方便的浏览文件,上传下载文件,支持断点续传等。
TypeScript
159
star
27

iOS-netdiag

Network Diagnosis for iOS
Objective-C
144
star
28

android-netdiag

Network Diagnosis for Android
Java
136
star
29

go-sdk

golang sdk
Go
136
star
30

webhook

Github.com webhook tools
Go
131
star
31

legacy-ios-sdk

Qiniu Resource (Cloud) Storage SDK for iOS
Objective-C
103
star
32

QStreaming

A simplified, lightweight ETL pipeline framework for build stream/batch processing applications on top of Apache Spark
Scala
101
star
33

audio

Audio support for Go language.
Go
79
star
34

api.v6

Qiniu Resource (Cloud) Storage SDK for Golang (v6.x)
Go
68
star
35

c-sdk

Qiniu Resource (Cloud) Storage SDK for C/C++
C
63
star
36

x

Extension of Go standard library
Go
62
star
37

http

Extension module of golang http service
Go
61
star
38

qfetch

七牛资源批量抓取工具,根据指定URL列表抓取资源并存储到七牛云空间。
Go
59
star
39

qplayer-sdk

七牛播放器SDK支持点播,直播,首开快,延迟低,接口简单,易于使用。
Java
57
star
40

qiniutest

Qiniu httptest tool: qiniutest
Go
37
star
41

builder

TypeScript
34
star
42

text

Qiniu Text Processing Libraries for Go
Go
34
star
43

ip17mon-java

17mon ip库查询
Java
33
star
44

formstate-x

Manage state of form with ease.
TypeScript
33
star
45

developer.qiniu.com

developer center
JavaScript
32
star
46

mockhttp.v1

mockhttp is a unit test tool that allow you test web services without listening port
Go
29
star
47

form-upload

Form upload demo for Qiniu Cloud Storage
Python
28
star
48

happy-dns-java

dns query client for java
Java
27
star
49

qiniu-logging-plugin

轻松输出Java应用日志到七牛云大数据日志平台
Java
26
star
50

rust-sdk

Generic Qiniu Resource Storage SDK
Rust
26
star
51

dart-sdk

Qiniu Resource (Cloud) Storage SDK for Dart
Dart
23
star
52

sdkspec

Qiniu Resource (Cloud) Storage SDK Specification
23
star
53

pandora-go-sdk

Go
21
star
54

doxygen.io

http://doxygen.io/ - Doxygen as Service
Go
19
star
55

go_dep_search

golang dependency search tool
Go
19
star
56

typed-less-modules

🎁 Generate type definitions (.d.ts) for CSS Modules using LESS
TypeScript
18
star
57

QiniuLiveWX

七牛直播、播放、连麦最简微信小程序demo
JavaScript
17
star
58

mockhttp.v2

mockhttp is a unit test tool that allow you test web services without listening port
Go
16
star
59

qlive

七牛直播命令行工具
Go
15
star
60

objc-DownloadSDK

Qiniu DownloadSDK for iOS
Objective-C
14
star
61

dyn

Package for dynamic programming
Go
12
star
62

reviewbot

reviewbot - establish software engineering best practices and efficiently promote them within the organization.
Go
12
star
63

pandora-java-sdk

Pandora Java SDK 多种方式灵活接入Pandora 大数据平台
Java
11
star
64

goplus-dt

Data Technology base of the Go+ language
Go
9
star
65

pandora-docs-old

CSS
9
star
66

kirk

Go
9
star
67

c-sdk-for-windows

Qiniu Resource (Cloud) Storage Windows SDK for C/C++
C
8
star
68

qwebtesttool

七牛本地网络环境检测图形界面。
C#
8
star
69

pandora-docs

pandora 文档站
JavaScript
7
star
70

php5.3-sdk

七牛云存储 php5.3 sdk(已经过时,请使用 php-sdk)
PHP
7
star
71

version

Go
6
star
72

qfetch-m3u8

qfetch m3u8专用版本,可以把m3u8和其引用的ts文件直接抓取到七牛云存储空间中
Go
6
star
73

openacc

Open Account System
6
star
74

api

Qiniu Resource (Cloud) Storage SDK for Golang
6
star
75

pandora-js-sdk

浏览器端使用的Pandora 大数据客户端打点SDK
JavaScript
6
star
76

deprecated-js-sdk

Qiniu Resource Storage SDK for JavaScript(deprecated)
JavaScript
6
star
77

docs.qiniu.com

CSS
5
star
78

eslint-config

ESLint config for Qiniu
JavaScript
5
star
79

php5-sdk

七牛云存储 PHP SDK,兼容 PHP 5.3 以下版本(已经过时,请使用 php-sdk)
PHP
5
star
80

httpping

http ping for test service
Go
5
star
81

link-c-sdk

qnlinking
C
5
star
82

QNLiveKit_Android

qlive-sdk是七牛云推出的一款互动直播低代码解决方案sdk。只需几行代码快速接入互动连麦pk直播。
Kotlin
5
star
83

cpp-sdk

Qiniu Resource Storage C++ SDK
C
4
star
84

objc-netinfo

Get NetworkInfo
Objective-C
4
star
85

pandora-python-sdk

Python
4
star
86

apidoc

Qiniu Resource (Cloud) Storage API Documents
4
star
87

kubernetes-csi-driver

CSI Plugin for Kubernetes, Support Qiniu Cloud Storage.
Go
4
star
88

qiniulab

C#
3
star
89

stack-go

七牛云主机服务 Go SDK
Go
3
star
90

Android-Universal-Image-Loader-HappyDns

Android-Universal-Image-Loader and happy dns
Java
3
star
91

kodo-enterprise-image

Shell
3
star
92

pfop

七牛持久化数据处理请求服务工具
Go
3
star
93

pandora-python-sdk.v2

SDK for Pandora 2.0
Python
3
star
94

raven

TypeScript
3
star
95

api-specs

Qiniu API Specs by YAML
3
star
96

pandora-php-sdk

PHP
3
star
97

pandora-nodejs-sdk

JavaScript
3
star
98

wp-sdk

Windows Phone SDK for Qiniu Cloud Storage API[不再维护]
C#
3
star
99

pandora-c-sdk

C/C++ SDK for Pandora Platform
C
2
star
100

rust-download-sdk

七牛下载 Rust SDK,负责下载完整或部分七牛对象。该 SDK 主要服务于专有云场景,对于普通的公有云 / 私有云场景,建议使用 https://github.com/qiniu/rust-sdk
Rust
2
star