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
2521ce7b
Commit
2521ce7b
authored
Aug 03, 2016
by
Miguel Ángel Martínez Triviño
Committed by
GitHub
Aug 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1019 from ebraminio/strictflag
Add a strict flag to helm lint
parents
1d718d79
107821f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
lint.go
cmd/helm/lint.go
+11
-1
No files found.
cmd/helm/lint.go
View file @
2521ce7b
...
@@ -47,7 +47,10 @@ var lintCommand = &cobra.Command{
...
@@ -47,7 +47,10 @@ var lintCommand = &cobra.Command{
RunE
:
lintCmd
,
RunE
:
lintCmd
,
}
}
var
flagStrict
bool
func
init
()
{
func
init
()
{
lintCommand
.
Flags
()
.
BoolVarP
(
&
flagStrict
,
"strict"
,
""
,
false
,
"fail on lint warnings"
)
RootCommand
.
AddCommand
(
lintCommand
)
RootCommand
.
AddCommand
(
lintCommand
)
}
}
...
@@ -59,6 +62,13 @@ func lintCmd(cmd *cobra.Command, args []string) error {
...
@@ -59,6 +62,13 @@ func lintCmd(cmd *cobra.Command, args []string) error {
paths
=
args
paths
=
args
}
}
var
lowestTolerance
int
if
flagStrict
{
lowestTolerance
=
support
.
WarningSev
}
else
{
lowestTolerance
=
support
.
ErrorSev
}
var
total
int
var
total
int
var
failures
int
var
failures
int
for
_
,
path
:=
range
paths
{
for
_
,
path
:=
range
paths
{
...
@@ -77,7 +87,7 @@ func lintCmd(cmd *cobra.Command, args []string) error {
...
@@ -77,7 +87,7 @@ func lintCmd(cmd *cobra.Command, args []string) error {
}
}
total
=
total
+
1
total
=
total
+
1
if
linter
.
HighestSeverity
>=
support
.
ErrorSev
{
if
linter
.
HighestSeverity
>=
lowestTolerance
{
failures
=
failures
+
1
failures
=
failures
+
1
}
}
}
}
...
...
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