gospec

command module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 7 Imported by: 0

README

gospec

a configurable golang coding specification checker.

Build Status Coverage Status Go Report Card Documentation

Installation

go get github.com/lovego/gospec

Usage

gospec [ <dir>/... | <dir> | <file> ] ...
  • dir/... means check the dir and the ".go" files in dir recursively.
  • dir means check the dir and the ".go" files in dir.
  • file means check only the file.
exmaple:
MacBook:~/go/src/my_project$ gospec models/...
+---------------------------------------+---------------------------------------------------+----------------------+
|               position                |                         problem                   |         rule         |
+---------------------------------------+---------------------------------------------------+----------------------+
| models/users/list.go:36:10            | func List params size: 7, limit: 5                | func.size.maxParams  |
| models/users/create_or_update.go:28:3 | func CreateOrUpdate results size: 4, limit: 3     | func.size.maxResults |
| models/users/delete.go:111:2          | local var name SQL should be lowerCamelCase style | localVar.style       |
+---------------------------------------+---------------------------------------------------+----------------------+

Configuration

gospec find the config file named ".gospec.yml" from current working directory upwards. It use the first one it find.

If no one is found, it uses the default configuration.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL