ruleguard

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

README

This directory contains ruleguard files that are used in functional tests.

Documentation

Overview

go:build ruleguard

go:build ruleguard

go:build ruleguard

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DupSubExpr

func DupSubExpr(m dsl.Matcher)

Suppose that we want to report the duplicated left and right operands of binary operations.

But if the operand has some side effects, this rule can cause false positives: `f() && f()` can make sense (although it's not the best piece of code).

This is where *filters* come to the rescue.

func RangeExprVal

func RangeExprVal(m dsl.Matcher)

func StringsSimplify

func StringsSimplify(m dsl.Matcher)

Types

This section is empty.

Jump to

Keyboard shortcuts

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