mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-10-22 10:44:09 +00:00
Fully support .yaml
(#1713)
Follow-up to https://github.com/woodpecker-ci/woodpecker/pull/1388 Closes https://github.com/woodpecker-ci/woodpecker/issues/1073 --------- Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -16,7 +16,7 @@ import (
|
||||
var Command = &cli.Command{
|
||||
Name: "lint",
|
||||
Usage: "lint a pipeline configuration file",
|
||||
ArgsUsage: "[path/to/.woodpecker.yml]",
|
||||
ArgsUsage: "[path/to/.woodpecker.yaml]",
|
||||
Action: lint,
|
||||
Flags: common.GlobalFlags,
|
||||
}
|
||||
@@ -33,7 +33,7 @@ func lintDir(c *cli.Context, dir string) error {
|
||||
}
|
||||
|
||||
// check if it is a regular file (not dir)
|
||||
if info.Mode().IsRegular() && strings.HasSuffix(info.Name(), ".yml") {
|
||||
if info.Mode().IsRegular() && (strings.HasSuffix(info.Name(), ".yaml") || strings.HasSuffix(info.Name(), ".yml")) {
|
||||
fmt.Println("#", info.Name())
|
||||
if err := lintFile(c, path); err != nil {
|
||||
errorStrings = append(errorStrings, err.Error())
|
||||
|
Reference in New Issue
Block a user