Merge lp://qastaging/~sergiusens/snapcraft/yaml-tabs into lp://qastaging/~snappy-dev/snapcraft/core
Proposed by
Sergio Schvezov
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Sergio Schvezov | ||||
Approved revision: | 168 | ||||
Merged at revision: | 156 | ||||
Proposed branch: | lp://qastaging/~sergiusens/snapcraft/yaml-tabs | ||||
Merge into: | lp://qastaging/~snappy-dev/snapcraft/core | ||||
Prerequisite: | lp://qastaging/~sergiusens/snapcraft/yaml_init | ||||
Diff against target: |
47 lines (+29/-0) 2 files modified
snapcraft/tests/test_yaml.py (+25/-0) snapcraft/yaml.py (+4/-0) |
||||
To merge this branch: | bzr merge lp://qastaging/~sergiusens/snapcraft/yaml-tabs | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ted Gould (community) | Approve | ||
Review via email:
|
Commit message
Provide a nice error when tabs found in snapcraft.yaml
To post a comment you must log in.
I think we need a UX opinion here. The \t character is not visible, so it could be hard to find. And that's assuming that the user knows what is \t and about parsing tokens. We are targeting package maintainers here, so maybe that's safe to assume.
I understand that with yaml, the leading spaces are important so we can't just strip them.
The alternative I see is to show a more useful message saying that X line on the yaml starts with an empty space, but that would mean catching and parsing the errors, or modifying the parser. Both alternatives suck.
How hard would it be to show the file name and line number in the error?
Do we have somebody from UX to ask this kind of things?