folded-ear/datawell

View on GitHub

Showing 16 of 16 total issues

Function demoRun has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func demoRun(cmd *Command, args ...string) {
    config := config.LoadConfig()

    fmt.Printf("driver: %v, open: %v\n", config.DriverName, config.DataSourceName)

Severity: Minor
Found in cmd_demo.go - About 1 hr to fix

    exported type Config should have comment or be unexported
    Open

    type Config struct {
    Severity: Minor
    Found in config/config.go by golint

    comment on exported type Command should be of the form "Command ..." (with optional leading article)
    Open

    // shamelessly snagged from the go tool
    Severity: Minor
    Found in cmd.go by golint

    exported type UserEditCommand should have comment or be unexported
    Open

    type UserEditCommand struct {
    Severity: Minor
    Found in cmd_user_edit.go by golint

    exported method Command.SprintFlagDefaults should have comment or be unexported
    Open

    func (c *Command) SprintFlagDefaults() string {
    Severity: Minor
    Found in cmd.go by golint

    exported type UserDeleteCommand should have comment or be unexported
    Open

    type UserDeleteCommand struct {
    Severity: Minor
    Found in cmd_user_delete.go by golint

    a blank import should be only in a main or test package, or have a comment justifying it
    Open

        _ "github.com/lib/pq"
    Severity: Minor
    Found in model/datastore.go by golint

    2: cannot find package "github.com/folded-ear/datawell/config" in any of:
    Open

        "github.com/folded-ear/datawell/config"
    Severity: Minor
    Found in cmd_demo.go by govet

    exported function LoadConfig should have comment or be unexported
    Open

    func LoadConfig() *Config {
    Severity: Minor
    Found in config/config.go by golint

    exported const DefaultDriverName should have comment (or a comment on this block) or be unexported
    Open

        DefaultDriverName     = "use db/dbconf.yml"
    Severity: Minor
    Found in config/config.go by golint

    exported method Command.Exec should have comment or be unexported
    Open

    func (c *Command) Exec(args []string) {
    Severity: Minor
    Found in cmd.go by golint

    exported function Db should have comment or be unexported
    Open

    func Db() (*sql.DB, error) {
    Severity: Minor
    Found in model/datastore.go by golint

    exported function Gorm should have comment or be unexported
    Open

    func Gorm() (*gorm.DB, error) {
    Severity: Minor
    Found in model/datastore.go by golint

    exported type ServeCommand should have comment or be unexported
    Open

    type ServeCommand struct {
    Severity: Minor
    Found in cmd_serve.go by golint

    exported type UserAddCommand should have comment or be unexported
    Open

    type UserAddCommand struct {
    Severity: Minor
    Found in cmd_user_add.go by golint

    exported const InitialPasswordLength should have comment (or a comment on this block) or be unexported
    Open

        InitialPasswordLength = 12
    Severity: Minor
    Found in cmd_user_add.go by golint
    Severity
    Category
    Status
    Source
    Language