blob: f5eb4901caa5fdc0afdd4a5b14cd9dd9d24628af [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Command lint is generic linter for Chrome OS test configs.
package main
import (
"context"
"infra/cros/cmd/tclint/internal/cmd"
"os"
"github.com/maruel/subcommands"
"go.chromium.org/luci/common/cli"
"go.chromium.org/luci/common/data/rand/mathrand"
"go.chromium.org/luci/common/logging/gologger"
)
func getApplication() *cli.Application {
return &cli.Application{
Name: "tclint",
Title: "Linter for Chrome OS test configuration data.",
Context: func(ctx context.Context) context.Context {
return gologger.StdConfig.Use(ctx)
},
Commands: []*subcommands.Command{
subcommands.CmdHelp,
cmd.Metadata,
cmd.Plan,
},
}
}
func main() {
mathrand.SeedRandomly()
os.Exit(subcommands.Run(getApplication(), nil))
}