Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
helm3
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
helm3
Commits
1242211f
Commit
1242211f
authored
May 16, 2016
by
Matt Butcher
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #709 from technosophos/fix/lint-err-missing-chart
fix(helm): stop processing if lint can't find a chart
parents
fd47cf78
1fc04f7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
lint.go
cmd/helm/lint.go
+14
-2
No files found.
cmd/helm/lint.go
View file @
1242211f
package
main
import
(
"errors"
"fmt"
"os"
"path/filepath"
"github.com/kubernetes/helm/pkg/lint"
"github.com/spf13/cobra"
...
...
@@ -20,20 +23,29 @@ var lintCommand = &cobra.Command{
Use
:
"lint [flags] PATH"
,
Short
:
"Examines a chart for possible issues"
,
Long
:
longLintHelp
,
Run
:
lintCmd
,
Run
E
:
lintCmd
,
}
func
init
()
{
RootCommand
.
AddCommand
(
lintCommand
)
}
func
lintCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
var
errLintNoChart
=
errors
.
New
(
"no chart found for linting (missing Chart.yaml)."
)
func
lintCmd
(
cmd
*
cobra
.
Command
,
args
[]
string
)
error
{
path
:=
"."
if
len
(
args
)
>
0
{
path
=
args
[
0
]
}
// Guard: Error out of this is not a chart.
if
_
,
err
:=
os
.
Stat
(
filepath
.
Join
(
path
,
"Chart.yaml"
));
err
!=
nil
{
return
errLintNoChart
}
issues
:=
lint
.
All
(
path
)
for
_
,
i
:=
range
issues
{
fmt
.
Printf
(
"%s
\n
"
,
i
)
}
return
nil
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment