cosmosanalysis

package
v28.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package cosmosanalysis provides a toolset for statically analysing Cosmos SDK's source code and blockchain source codes based on the Cosmos SDK

Index

Constants

This section is empty.

Variables

View Source
var AppImplementation = []string{
	"AppCodec",
	"GetKey",
	"GetMemKey",
	"RegisterAPIRoutes",
}

Functions

func DeepFindImplementation

func DeepFindImplementation(modulePath string, interfaceList []string) (found []string, err error)

DeepFindImplementation functions the same as FindImplementation, but walks recursively through the folder structure Useful if implementations might be in sub folders.

func FindAppFilePath

func FindAppFilePath(chainRoot string) (path string, err error)

FindAppFilePath looks for the app file that implements the interfaces listed in AppImplementation.

func FindImplementation

func FindImplementation(modulePath string, interfaceList []string) (found []string, err error)

FindImplementation finds the name of all types that implement the provided interface.

func FindImplementationInFile

func FindImplementationInFile(n ast.Node, interfaceList []string) (found []string)

FindImplementationInFile find all struct implements the interfaceList into an ast.File.

func IsChainPath

func IsChainPath(path string) error

IsChainPath returns nil if path contains a cosmos chain.

func ValidateGoMod

func ValidateGoMod(module *modfile.File) error

ValidateGoMod check if the cosmos-sdk and the tendermint packages are imported.

Types

type ErrPathNotChain

type ErrPathNotChain struct {
	// contains filtered or unexported fields
}

ErrPathNotChain is returned by IsChainPath() when path is not a chain path.

func (ErrPathNotChain) Error

func (e ErrPathNotChain) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL