pouchlinter is a very useful linter tool used in all pouch-related open source golang repositories.
Any project can use pouchlinter to linter code and document.
Lots of container-related open source projects in Alibaba have adopted pouchlinter as a very essential tool to make code and document better.
- PouchContainer: an efficient container engine;
- Dragonfly: a cloud native image distirbution system;
- Sentinel: A lightweight flow-control library providing high-available protection and monitoring.
If you are using tool pouchlinter locally, you need to install a container engine(PouchContainer or Docker) since pouchlinter is totally encapsulated in a container image. Because only Linux OS could support container images, pouchlinter can only be used on Linux OS.
Here we take PouchContainer as an example.
It is quite easy to install PouchContainer engine locally, just use apt-get
or yum
to make it.
# install PouchContainer on ubuntu
$ sudo apt-get install pouch
or install that on CentOS series:
# install PouchContainer on CentOS
$ sudo yum install pouch
After installing container engine, we could pull pouchlinter image to enable linter functionality:
# pull pouchlinter images
$ pouch pull pouchcontainer/pouchlinter:v0.1.2
Run pouchlinter torwards your target repo or file is quite simple, only map your local repo or file inside to running container.
# check a local file via misspell
$ pouch run -v fileA:/tmp/fileA pouchcontainer/pouchlinter:v0.1.2 misspell /tmp/fileA