Esempio n. 1
0
def rule_runner() -> RuleRunner:
    return RuleRunner(
        target_types=[GoBinary, GoPackage],
        rules=[
            *external_tool.rules(),
            *fmt.rules(),
            *gofmt_rules(),
            *source_files.rules(),
            QueryRule(LintResults, (GofmtRequest, )),
            QueryRule(FmtResult, (GofmtRequest, )),
            QueryRule(SourceFiles, (SourceFilesRequest, )),
        ],
    )
Esempio n. 2
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        target_types=[GoModTarget],
        rules=[
            *fmt.rules(),
            *gofmt_rules(),
            *source_files.rules(),
            *target_type_rules.rules(),
            *first_party_pkg.rules(),
            *third_party_pkg.rules(),
            *sdk.rules(),
            *go_mod.rules(),
            *build_pkg.rules(),
            *link.rules(),
            *assembly.rules(),
            QueryRule(LintResults, (GofmtRequest, )),
            QueryRule(FmtResult, (GofmtRequest, )),
            QueryRule(SourceFiles, (SourceFilesRequest, )),
        ],
    )
    rule_runner.set_options([], env_inherit={"PATH"})
    return rule_runner
Esempio n. 3
0
def rules():
    return [
        *assembly.rules(),
        *build_pkg.rules(),
        *build_pkg_target.rules(),
        *check.rules(),
        *third_party_pkg.rules(),
        *golang.rules(),
        *import_analysis.rules(),
        *go_mod.rules(),
        *first_party_pkg.rules(),
        *link.rules(),
        *sdk.rules(),
        *tests_analysis.rules(),
        *tailor.rules(),
        *target_type_rules.rules(),
        *test.rules(),
        *run_binary.rules(),
        *package_binary.rules(),
        # Gofmt
        *fmt.rules(),
        *gofmt_rules(),
        *gofmt_skip_field.rules(),
    ]
Esempio n. 4
0
def rules():
    return [*fmt.rules(), *gofmt_rules(), *skip_field.rules()]