| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Golang clean architecture linter
A golang linter based on Uncle Bob's clean code concepts.
The linter builds a hierarchical model from the project directory AST and assign a level for every package used by the project (with the exception of a standart golang library). The dependency levels are defined by the imports of a higher order package. If main package is considered level 0, then all of its import will be 1. The subsequent imports of level 1 packages are respectively level 2 etc.
In plain mod, Uncle Bob will not allow same level imports.
In strict mod, Uncle Bob will only allow one level inward import (ex. level 0 can only import level 1 packages, level 1 can only import level 2 etc...)
Can by used in pipelines. If an issue is detected Uncle Bob will exit with status 1.
Linter works with go mod enabled
Build the project
$ go buildInstall the linter on Linux
$ go installFor running uncle bob, go to the project root directory, where the go.mod is located and simply run
$ uncle-bobTo ignore test files
$ uncle-bob -ignore-testsShow detailed information about package imports
$ uncle-bob -package-imports=github.com/audi70r/uncle-bob/checkerDo strict checking, allow only one level inward imports
$ uncle-bob -strictUncle Bob provides multiple visualization options to help understand your project's architecture.
Generate a dependency graph in DOT format (can be used with GraphViz tools)
$ uncle-bob -dot > deps.dotGenerate an interactive HTML report showing package dependencies
$ uncle-bob -html=report.htmlGenerate an immersive 3D visualization of your package architecture as a building structure
$ uncle-bob -3d=architecture.htmlThe 3D visualization represents your architecture as a building with:
Interactive controls:
Do whatever you want with it, but don't disrespect Uncle Bob!
| Back | FazBrowse Home | New Git URL |