mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Improve error message if filename does not match document/tracking/id and let it be reported by the proper reporter (#382)
* Improve error message if filename does not match document/tracking/id and let it be reported by the proper reporter * style: remove unnecessary "\n" * style: convert space to tab to calm linter --------- Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com> Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de> Co-authored-by: tschmidtb51 <65305130+tschmidtb51@users.noreply.github.com>
This commit is contained in:
parent
b61912410a
commit
f97891c283
2 changed files with 3 additions and 3 deletions
|
|
@ -49,8 +49,8 @@ func IDMatchesFilename(eval *PathEval, doc any, filename string) error {
|
|||
}
|
||||
|
||||
if CleanFileName(id) != filename {
|
||||
return fmt.Errorf("document/tracking/id %q does not match filename %s",
|
||||
id, filename)
|
||||
return fmt.Errorf("filename %s does not match document/tracking/id %q",
|
||||
filename, id)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue