Skip to content

Commit 7fb76f7

Browse files
committed
Merge commit '7cfffc1f06d9d1f78c6f3ea1b0e9a8936de709ca' into chore/bump-linter
Signed-off-by: Pavel Okhlopkov <pavel.okhlopkov@flant.com>
2 parents 27222de + 7cfffc1 commit 7fb76f7

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

pkg/linters/module/rules/oss_library.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ func (r *OSSRule) OssModuleRule(moduleRoot string, errorList *errors.LintRuleErr
6565

6666
func ossFileErrorMessage(err error) string {
6767
if os.IsNotExist(err) {
68-
return "Module should have " + ossFilename
68+
return "module should have " + ossFilename
6969
}
7070

71-
return fmt.Sprintf("Invalid %s: %s", ossFilename, err.Error())
71+
return fmt.Sprintf("invalid %s: %s", ossFilename, err.Error())
7272
}
7373

7474
func verifyOssFile(moduleRoot string, errorList *errors.LintRuleErrorsList) {

pkg/linters/module/rules/oss_library_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestOSSRule_OssModuleRule(t *testing.T) {
5353
{
5454
name: "oss.yaml missing",
5555
setupFiles: map[string]string{},
56-
wantErrors: []string{"no such file or directory"},
56+
wantErrors: []string{"module should have oss.yaml"},
5757
},
5858
{
5959
name: "oss.yaml invalid yaml",
@@ -124,7 +124,7 @@ func TestOSSRule_OssModuleRule(t *testing.T) {
124124
license: "Apache License 2.0"
125125
`,
126126
},
127-
wantErrors: []string{"version must not be empty. Please fill in the parameter and configure CI (werf files for module images) to use these setting. See ADR \"platform-security/2026-01-21-oss-yaml-werf.md\""},
127+
wantErrors: []string{"version must not be empty. Please fill in the parameter and configure CI (werf files for module images) to use these setting."},
128128
},
129129
{
130130
name: "project with invalid semver version",
@@ -255,7 +255,7 @@ func TestOSSRule_OssModuleRule(t *testing.T) {
255255
// Setup files
256256
for filename, content := range tt.setupFiles {
257257
path := filepath.Join(tempDir, filename)
258-
if err := os.WriteFile(path, []byte(content), 0644); err != nil {
258+
if err := os.WriteFile(path, []byte(content), 0644); err != nil { //nolint:gosec // resolve when bump lint
259259
t.Fatalf("failed to write file %s: %v", filename, err)
260260
}
261261
}
@@ -272,9 +272,10 @@ func TestOSSRule_OssModuleRule(t *testing.T) {
272272
var errorTexts []string
273273
var warnTexts []string
274274
for _, e := range errs {
275-
if e.Level == pkg.Error {
275+
switch e.Level {
276+
case pkg.Error:
276277
errorTexts = append(errorTexts, e.Text)
277-
} else if e.Level == pkg.Warn {
278+
case pkg.Warn:
278279
warnTexts = append(warnTexts, e.Text)
279280
}
280281
}

trdl_channels.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ groups:
22
- name: "0"
33
channels:
44
- name: alpha
5-
version: 0.1.64
5+
version: 0.1.65
66
- name: stable
7-
version: 0.1.64
7+
version: 0.1.65

0 commit comments

Comments
 (0)