gorules

package
v2.36.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package gorules defines custom lint rules for ruleguard.

golangci-lint runs these rules via go-critic, which includes support for ruleguard. All Go files in this directory define lint rules in the Ruleguard DSL; see:

- https://go-ruleguard.github.io/by-example/ - https://pkg.go.dev/github.com/quasilyte/go-ruleguard/dsl

You run one of the following commands to execute your go rules only:

golangci-lint run
golangci-lint run --disable-all --enable=gocritic

Note: don't forget to run `golangci-lint cache clean`!

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FullResponseWriter

func FullResponseWriter(m dsl.Matcher)

FullResponseWriter ensures that any overridden response writer has full functionality. Mainly is hijackable and flushable.

func HttpAPIErrorMessage

func HttpAPIErrorMessage(m dsl.Matcher)

HttpAPIErrorMessage intends to enforce constructing proper sentences as error messages for the api. A proper sentence includes proper capitalization and ends with punctuation. There are ways around the linter, but this should work in the common cases.

func HttpAPIReturn

func HttpAPIReturn(m dsl.Matcher)

HttpAPIReturn will report a linter violation if the http function is not returned after writing a response to the client.

func ProperRBACReturn

func ProperRBACReturn(m dsl.Matcher)

ProperRBACReturn ensures we always write to the response writer after a call to Authorize. If we just do a return, the client will get a status code 200, which is incorrect.

Types

This section is empty.

Directories

Path Synopsis
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format:
aibridgepricesgen converts a models.dev api.json snapshot into generated artifacts, selected by -format:
apidocgen
postprocess command
swaginit command
Package main wraps swag init with Strict mode enabled.
Package main wraps swag init with Strict mode enabled.
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues.
Command configdocgen generates the Coder server configuration reference at docs/admin/setup/configuration-reference.md from codersdk.DeploymentValues.
Command develop orchestrates the Coder development environment.
Command develop orchestrates the Coder development environment.
Package docgenenv normalizes the process environment so documentation generators produce host-independent output.
Package docgenenv normalizes the process environment so documentation generators produce host-independent output.
Start an embedded postgres database on port 5432.
Start an embedded postgres database on port 5432.
scanner command
Package main provides a tool to scan Go source files and extract Prometheus metric definitions.
Package main provides a tool to scan Go source files and extract Prometheus metric definitions.
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision.
This program generates an input.json file containing action, object, and subject fields to be used as input for `opa eval`, e.g.: > opa eval --format=pretty "data.authz.allow" -d policy.rego -i input.json This helps verify that the policy returns the expected authorization decision.
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout.
telemetry-server is a standalone HTTP server that receives telemetry snapshots and prints them as a JSON stream to stdout.

Jump to

Keyboard shortcuts

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