package synccheck

import "github.com/Diarkis/diarkis/analysis/passes/synccheck"

Package synccheck defines an analyzer that detects incorrectly defined sync types within the Diarkis code base

Analyzer synchceck

syncheck: check for incorrectly defined sync types

We are checking to make sure that the following doesn't happen with sync type definitions:

var mutex = &sync.RWMutex{} // bad
var atomicVar = atomic.Int32{} // bad

instead...

var mutex sync.RWMutex // good
var mutex atomic.Int32 // good

Index

Variables

var Analyzer = &analysis.Analyzer{
	Name:     "synccheck",
	Doc:      "Checks that sync types are defined correctly",
	Requires: []*analysis.Analyzer{inspect.Analyzer},
	Run:      run,
}

Analyzer for synccheck; checks that sync types are defined correctly

Directories

cmd The synccheck command applies the github.com/Diarkis/diarkis/analysis/synccheck analysis to the specified packages of Go source code.