checks

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckConstantRef

func CheckConstantRef() *thriftcheck.Check

CheckConstantRef returns a thriftcheck.Check that ensures that a constant reference's target can be resolved.

func CheckEnumExplicit

func CheckEnumExplicit() *thriftcheck.Check

CheckEnumExplicit returns a thriftcheck.Check that warns or errors if an enumeration's element uses implicit values.

func CheckEnumSize

func CheckEnumSize(warningLimit, errorLimit int) *thriftcheck.Check

CheckEnumSize returns a thriftcheck.Check that warns or errors if an enumeration's element size grows beyond a limit.

func CheckFieldDocMissing

func CheckFieldDocMissing() *thriftcheck.Check

CheckFieldDocMissing if a field is missing a documentation comment.

func CheckFieldIDMissing

func CheckFieldIDMissing() *thriftcheck.Check

CheckFieldIDMissing reports an error if a field's ID is missing.

func CheckFieldIDNegative

func CheckFieldIDNegative() *thriftcheck.Check

CheckFieldIDNegative reports an error if a field's ID is explicitly negative.

func CheckFieldIDZero

func CheckFieldIDZero() *thriftcheck.Check

CheckFieldIDZero reports an error if a field's ID is explicitly zero.

func CheckFieldOptional

func CheckFieldOptional() *thriftcheck.Check

CheckFieldOptional warns if a field isn't declared as "optional".

func CheckFieldRequiredness

func CheckFieldRequiredness() *thriftcheck.Check

CheckFieldRequiredness warns if a field isn't explicitly declared as "required" or "optional".

func CheckIncludePath

func CheckIncludePath() *thriftcheck.Check

CheckIncludePath returns a thriftcheck.Check that verifies that all of the files `include`'d by a Thrift file can be found in the includes paths.

func CheckIncludeRestricted

func CheckIncludeRestricted(patterns map[string]*regexp.Regexp) *thriftcheck.Check

CheckIncludeRestricted returns a thriftcheck.Check that restricts some files from being imported by other files using a map of patterns: the key is a file name pattern that matches the including filename and the value is a regular expression that matches the included filename. When both match, the `include` is flagged as "restricted" and an error is reported.

func CheckInteger64bit

func CheckInteger64bit() *thriftcheck.Check

CheckInteger64bit warns when an integer constant exceeds the 32-bit number range.

func CheckMapKeyType

func CheckMapKeyType() *thriftcheck.Check

CheckMapKeyType returns a thriftcheck.Check that ensures that only primitive types are used for `map<>` keys.

func CheckNamesCasing

func CheckNamesCasing(caseCfg map[string]string) *thriftcheck.Check

CheckNamesCasing checks if each node complies with the casing rules.

func CheckNamesReserved

func CheckNamesReserved(names []string) *thriftcheck.Check

CheckNamesReserved checks if a node's name is in the list of reserved names.

func CheckNamespacePattern

func CheckNamespacePattern(patterns map[string]*regexp.Regexp) *thriftcheck.Check

CheckNamespacePattern returns a thriftcheck.Check that ensures that a namespace's name matches a regular expression pattern. The pattern can be configured one a per-language basis.

func CheckSetValueType

func CheckSetValueType() *thriftcheck.Check

CheckSetValueType returns a thriftcheck.Check that ensures that only primitive types are used for `set<>` values.

Types

This section is empty.

Jump to

Keyboard shortcuts

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