Skip to content

Latest commit

History

History
21 lines (15 loc) 路 763 Bytes

Filters.md

File metadata and controls

21 lines (15 loc) 路 763 Bytes

Filters

TypeStat ships with built-in support for using tsquery to ignore sections of source files. This is useful for...

  • ...when sections of source files can be safely excluded from type coverage
  • ...when you want to only touch up certain parts of source files

filter will exclude any portions of source code that match them. Sub-sections (child nodes) of those portions will not be visited.

For example, it's common in some architectures for classes to have dispose() methods (mirroring C#'s IDisposable) where private members are set to null. You can use filter to exclude these nulls from type calculations.

filter

{
	"filter": ["MethodDeclaration[name.text=dispose]"]
}