Skip to content

Cells Linter adds custom linters that must be passing on Cells code before building.

License

Notifications You must be signed in to change notification settings

pydio/cells-linter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cells Linter

This tool is a custom GO linter for Cells code, based on the go/analysis package. It must be passing before builds are performed.

Usage

Compile the linter and run ./cells-linter github.com/pydio/cells/... (or any other package, or a specific go file).

The execution output is 0 if no warnings were found, 3 otherwise.

Analyzers

addcheck

A sample boilerplate based on Using go/analysis to write a custom linter blog post.

zapslices

An analyzer looking for zap.Any() calls that would pass a "slice" as argument to logger. Real-life examples show that passing huge slices to the logger can totally stick a service. When writing code for Cells, developers must use log.DangerouslyZapSmallSlices() instead, indicating that they are sure that the logged slice will never grow huge.

About

Cells Linter adds custom linters that must be passing on Cells code before building.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages