Giter Club home page Giter Club logo

golang-analyzer-inline-bazel's Introduction

Bazel Golang Inline Analyzer

Experimenting with having analyzers locally defined to a repository, rather than externally defined.

Notes

  • Requires using go_tool_library instead of go_library due to a dependency change issue (must also use go_tool_library of deps)
  • Baked natively into nogo, so it can be pretty straightforward to test
  • Names of types aren't as simple as package.Type, but instead include other components (using HasSuffix) (What options are there?)
  • Change in 'internal/cobrago/storage.go@ListFilesInStorage' can be removed as a test case for the errors
  • The tools/ directory probably isn't the best path. Want something that we can spin-out/externalize as these evolve with the code

Overall this is a pretty good way to start prototyping mechanisms for code analysis that is right next to the code, which can then later be spun out into their own generic analyzers. As it runs automatically with nogo, there is a natural way of enabling an analyzer in a tiered manner (warning => error).

What would be necessary to get these setup in as lightweight as possible way to ensure very simple constraints? E.g. Don't use 'XYZ' type while in 'ABC' module. The main goal of having these would be essentially creating 'Tests' for the code to ensure that code is being built in a manner idiomatic to the codebase.

golang-analyzer-inline-bazel's People

Contributors

jrbeverly avatar

Watchers

James Cloos avatar  avatar

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.