package tdtransportcheck
import "github.com/Diarkis/diarkis/analysis/passes/tdtransportcheck"
Package tdtransportcheck defines an analyzer that detects incorrect usage of the methods of diarkis tdtransport package per definitions
Analyzer tdtransportcheck
tdtransportcheck: check for correct usage of tdtransportcheck methods
We are checking to make sure that the following doesn't happen with usage of td methods:
Ex: We create some instance of transportdata
var exampleTransportData = td.DefineTransportData([]td.Property{ td.Property{ Name: "UID", Type: td.String }, td.Property{ Name: "SID", Type: td.String }, })
And then we attempt to set/get some property that doesn't exist...!
td := exampleTransportData.New() td.SetAsString("UID", "exampleUserUID") // good td.SetAsInt("counter", 0) // bad, there is no field counter!
Index
Variables
var Analyzer = &analysis.Analyzer{ Name: "tdtransportcheck", Doc: "Checks for incorrect usage of transport data property assignments", Requires: []*analysis.Analyzer{inspect.Analyzer}, Run: run, }
Analyzer for tdtransportcheck; checks for incorrect usage of transport data property assignments.
Directories
cmd | The tdtransportcheck command applies the github.com/Diarkis/diarkis/analysis/tdtransportcheck analysis to the specified packages of Go source code. |