Skip to content

Latest commit

 

History

History
executable file
·
74 lines (42 loc) · 1.97 KB

api.md

File metadata and controls

executable file
·
74 lines (42 loc) · 1.97 KB

LinterInfo

load("@apple_rules_lint//lint:defs.bzl", "LinterInfo")

LinterInfo(language, name)

FIELDS

Name Description
language The language or kind of thing we are linting.
name The name of the linter

get_lint_config

load("@apple_rules_lint//lint:defs.bzl", "get_lint_config")

get_lint_config(linter_name, tags)

Gets the lint config for a particular linter from the tags of a rule.

This will return either None or the label configured in lint_setup. If the tags no-lint or no-linter_name (eg. no-java-checkstyle) are found, then None will be returned. This allows linting to be turned off for specific rules.

PARAMETERS

Name Description Default Value
linter_name The "well known" name of the linter (eg. java-checkstyle) none
tags The tags from the rule (eg. ctx.attr.tags) none

package_lint_config

load("@apple_rules_lint//lint:defs.bzl", "package_lint_config")

package_lint_config(linters)

Register the given linters for the current bazel package.

This is expected to be near the top of the BUILD.bazel file and allows users to override or configure specific linters for a bazel package.

PARAMETERS

Name Description Default Value
linters a dict of "well known name" to Label. none