-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
validate does not return useful messages #4
Comments
Currently it validates against the SAM language specification - you can see this is you put
CodeUri specifically is a required parameter, but only for packaged templates. As such, it doesn't make much sense to highlight this as a hard error in a template that might still be in progress (sam validate is designed to be integrated into IDE's as a linting tool too).
I dug into this and it's two problems:
I'm working on a fix for both. |
Fixed in b673757 |
I don't think that's the right commit. |
I'm getting the same error with a template created by CodeStar. The template works fine, but running validate returns the error. |
fix: emphasize OSes and adds link to Docker file sharing opts fix merge conflict - formatting commit fix: adds Path adjustment procedure along with installation fix merge conflict aws#4 fix: Add explicit command on update preferred shell configuration fix merge conflict aws#5 fix: Emphasis on ``sam init`` under Usage fix: Formatting issues under Package and Deploy section fix: removes get started section as it's outdated fix merge conflict aws#6 fix merge conflict aws#7 fix: RST doesn't support bold+code, falling back to code only improv: Brings sam init to first command in Usage for instant gratification fix: adds a note on Path for OSX users
Given a template:
Invoking:
sam validate
returns:
Valid!
Should it return valid given that we have no code-uri or other required attributes? What exactly is it validating?
Given this template:
Invoking
sam validate
Returns:
ERROR: Failed to read the resources line numbers. This usually means that the template contains invalid indentation. Please check it and try again
This error message isn't helpful in determining what's wrong. I still haven't figured out what's wrong.
However both templates are valid from the point of view of cloudformation:
aws cloudformation validate-template --template-body file://template.yaml
The text was updated successfully, but these errors were encountered: