Skip to content

Commit 0493dc4

Browse files
committed
fix
Signed-off-by: Sinelnikov Michail <mikhail.sinelnikov@flant.com>
1 parent 765b599 commit 0493dc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/linters/module/rules/oss_library.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const (
5757
)
5858

5959
func (r *OSSRule) OssModuleRule(moduleRoot string, errorList *errors.LintRuleErrorsList) {
60-
errorList = errorList.WithRule(r.GetName())
60+
errorList = errorList.WithRule(r.GetName()).WithFilePath(filepath.Join(moduleRoot, ossFilename))
6161

6262
if !r.Enabled() {
6363
errorList = errorList.WithMaxLevel(ptr.To(pkg.Ignored))
@@ -84,9 +84,9 @@ func verifyOssFile(moduleRoot string, errorList *errors.LintRuleErrorsList) {
8484
projects, err := readOssFile(moduleRoot)
8585
if err != nil {
8686
if os.IsNotExist(err) {
87-
errorList.WithFilePath(moduleRoot).Warn(ossFileErrorMessage(err))
87+
errorList.Warn(ossFileErrorMessage(err))
8888
} else {
89-
errorList.WithFilePath(moduleRoot).Error(ossFileErrorMessage(err))
89+
errorList.Error(ossFileErrorMessage(err))
9090
}
9191

9292
return

0 commit comments

Comments
 (0)