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
e2003143
Commit
e2003143
authored
Jul 01, 2016
by
Miguel Ángel Martínez Triviño
Committed by
GitHub
Jul 01, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #917 from migmartri/templates-typo
Fixing linter typos
parents
eee6e143
3b2ea043
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
lint_test.go
pkg/lint/lint_test.go
+1
-1
chartfile.go
pkg/lint/rules/chartfile.go
+2
-2
template.go
pkg/lint/rules/template.go
+1
-1
No files found.
pkg/lint/lint_test.go
View file @
e2003143
...
@@ -39,7 +39,7 @@ func TestBadChart(t *testing.T) {
...
@@ -39,7 +39,7 @@ func TestBadChart(t *testing.T) {
var
w
,
e
,
e2
,
e3
bool
var
w
,
e
,
e2
,
e3
bool
for
_
,
msg
:=
range
m
{
for
_
,
msg
:=
range
m
{
if
msg
.
Severity
==
support
.
WarningSev
{
if
msg
.
Severity
==
support
.
WarningSev
{
if
strings
.
Contains
(
msg
.
Text
,
"
Templates directory
not found"
)
{
if
strings
.
Contains
(
msg
.
Text
,
"
Directory 'templates/'
not found"
)
{
w
=
true
w
=
true
}
}
}
}
...
...
pkg/lint/rules/chartfile.go
View file @
e2003143
...
@@ -59,7 +59,7 @@ func Chartfile(linter *support.Linter) {
...
@@ -59,7 +59,7 @@ func Chartfile(linter *support.Linter) {
func
validateChartYamlFileExistence
(
chartPath
string
)
(
lintError
support
.
LintError
)
{
func
validateChartYamlFileExistence
(
chartPath
string
)
(
lintError
support
.
LintError
)
{
_
,
err
:=
os
.
Stat
(
chartPath
)
_
,
err
:=
os
.
Stat
(
chartPath
)
if
err
!=
nil
{
if
err
!=
nil
{
lintError
=
fmt
.
Errorf
(
"Chart.yaml file does not exist
s
"
)
lintError
=
fmt
.
Errorf
(
"Chart.yaml file does not exist"
)
}
}
return
return
}
}
...
@@ -137,7 +137,7 @@ func validateChartEngine(cf *chart.Metadata) (lintError support.LintError) {
...
@@ -137,7 +137,7 @@ func validateChartEngine(cf *chart.Metadata) (lintError support.LintError) {
keys
=
append
(
keys
,
str
)
keys
=
append
(
keys
,
str
)
}
}
lintError
=
fmt
.
Errorf
(
"Chart.yaml:
'engine %v
not valid. Valid options are %v"
,
cf
.
Engine
,
keys
)
lintError
=
fmt
.
Errorf
(
"Chart.yaml:
engine '%v'
not valid. Valid options are %v"
,
cf
.
Engine
,
keys
)
return
return
}
}
...
...
pkg/lint/rules/template.go
View file @
e2003143
...
@@ -110,7 +110,7 @@ func Templates(linter *support.Linter) {
...
@@ -110,7 +110,7 @@ func Templates(linter *support.Linter) {
// Validation functions
// Validation functions
func
validateTemplatesDir
(
templatesPath
string
)
(
lintError
support
.
LintError
)
{
func
validateTemplatesDir
(
templatesPath
string
)
(
lintError
support
.
LintError
)
{
if
fi
,
err
:=
os
.
Stat
(
templatesPath
);
err
!=
nil
{
if
fi
,
err
:=
os
.
Stat
(
templatesPath
);
err
!=
nil
{
lintError
=
fmt
.
Errorf
(
"
Templates directory
not found"
)
lintError
=
fmt
.
Errorf
(
"
Directory 'templates/'
not found"
)
}
else
if
err
==
nil
&&
!
fi
.
IsDir
()
{
}
else
if
err
==
nil
&&
!
fi
.
IsDir
()
{
lintError
=
fmt
.
Errorf
(
"'templates' is not a directory"
)
lintError
=
fmt
.
Errorf
(
"'templates' is not a directory"
)
}
}
...
...
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