Exemplo n.º 1
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(),
        *pkg_analyzer.rules(),
        *sdk.rules(),
        *tests_analysis.rules(),
        *tailor.rules(),
        *target_type_rules.rules(),
        *test.rules(),
        *run_binary.rules(),
        *package_binary.rules(),
        *load_go_binary.rules(),
        # Gofmt
        *gofmt_rules(),
        *gofmt_skip_field.rules(),
    ]
Exemplo n.º 2
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, )),
        ],
    )
Exemplo n.º 3
0
def rule_runner() -> RuleRunner:
    rule_runner = RuleRunner(
        target_types=[GoModTarget, GoPackageTarget],
        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(FmtResult, (GofmtRequest, )),
            QueryRule(SourceFiles, (SourceFilesRequest, )),
        ],
    )
    rule_runner.set_options([], env_inherit={"PATH"})
    return rule_runner
Exemplo n.º 4
0
def rules():
    return [*fmt.rules(), *gofmt_rules(), *skip_field.rules()]