Giter VIP home page Giter VIP logo

gouberfmt's Introduction

gouberfmt

Experimental golang static analysis tool that supports Uber Go Style Guide

Introduction

A static analysis is a function that inspects a package of Go code and reports a set of diagnostics (typically mistakes in the code), and perhaps produces other results as well, such as suggested refactorings or other facts.

The goal of this tool is to report missing idiomatic conventions in Go code based on Uber Go Style Guide

Installation

Will be added later

List of Supported Analyzers

  • Pointer to Interface

    // interface-pointer: var ifacePointer uses pointer to interface
    var ifacePointer *interface{}
  • Pointer to sync.Mutex

    // "mutex-pointer: var lock uses pointer to sync.Mutex"
    var lock *sync.Mutex
  • Copy Boundary

    func SetSlice(slice []Slice) {
      anotherSlice = slice // "copy-boundary: copies a slice directly"
    }
  • Channel Size

    c := make(chan int, 64) // "chan-size: channel size should be one or none"

Todo list

  • Pointers to Interfaces
  • Receivers and Interfaces
  • Zero-value Mutexes
  • Copy Boundary
  • Defer to Clean Up
  • Channel Size is One or None
  • Start Enums at One
  • Error Types
  • Error Wrapping
  • Don't Panic
  • Prefer strconv over fmt
  • Avoid string-to-byte conversion

Contribution

Please read the contributing guideline guideline if you wish to contribute

License

This projects is licensed under the MIT License

gouberfmt's People

Contributors

sadlil avatar faem avatar alaminopu avatar mirshahriar avatar

Stargazers

Amanbolat avatar  avatar  avatar David Benjamin avatar  avatar Dipta Das avatar Abdullah Al Maruf avatar

Watchers

Abu Ashraf Masnun avatar James Cloos avatar  avatar  avatar

Forkers

faem mirshahriar

gouberfmt's Issues

Update Readme

I believe following things should be included in the readme to make it easier for other contributors.

  1. Single liner purpose of the tool
  2. Short Description
  3. Installation guide
  4. Example Usages (If any - We already have two)
  5. Todo list - What are things (analyzers) we are going to cover
  6. Contribution Guidelines
  7. License

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.