Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Reference cannot tell the specific line on the spec #452

Open
liangchenye opened this issue Aug 30, 2017 · 2 comments
Open

Error Reference cannot tell the specific line on the spec #452

liangchenye opened this issue Aug 30, 2017 · 2 comments

Comments

@liangchenye
Copy link
Member

Now, we can only tell the markdown place. For some config items which include several 'MUST/SHOULD', it might be difficult for user to find out the detailed error.

@liangchenye
Copy link
Member Author

Original discussion is from #451.

 	for _, hook := range hooks {
 		if !filepath.IsAbs(hook.Path) {
-			msgs = append(msgs, fmt.Sprintf("The %s hook %v: is not absolute path", hookType, hook.Path))
+			errs = multierror.Append(errs, fmt.Errorf("The %s hook %v: is not absolute path", hookType, hook.Path))
              }
       }
The MUST for this check is here. For poststart and poststop the requirement is indirect, via this and this. Perhaps we should expand Error.Reference to an array of strings so we can represent trails like that? Although if we're sticking to Markdown links, this is as specific as we can get at the moment, and it covers all the lines I linked earlier.

@wking
Copy link
Contributor

wking commented Aug 30, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants