Skip to content

Test snippet format matches a directory it is in #1097

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

Merged
merged 1 commit into from
Jan 14, 2019

Conversation

EgZvor
Copy link
Contributor

@EgZvor EgZvor commented Jan 8, 2019

(see commit cfc7e52)
An UltiSnips snippet was added into "snippets" directory which should
contain snipmate snippets only. This led to a parsing bug in UltiSnips.

An error occured. This is either a bug in UltiSnips or a bug in a
snippet definition. If you think this is a bug, please report it to
https://github.com/SirVer/ultisnips/issues/new
Please read and follow:
https://github.com/SirVer/ultisnips/blob/master/CONTRIBUTING.md#reproducing-bugs

Following is the full stack trace:
Traceback (most recent call last):
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/err_to_scratch_buffer.py", line 16, in wrapper
    return func(self, *args, **kwds)
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 151, in snippets_in_current_scope
    snippets = self._snips(before, True)
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/snippet_manager.py", line 574, in _snips
    source.ensure(filetypes)
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 32, in ensure
    self._load_snippets_for(ft)
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 54, in _load_snippets_for
    self._parse_snippets(ft, fn)
  File "$HOME/.vim/pack/minpac/start/ultisnips/pythonx/UltiSnips/snippet/source/file/_base.py", line 69, in _parse_snippets
    raise SnippetSyntaxError(filename, line_index, msg)
SnippetSyntaxError: Invalid line '@unittest.skip(${1:skip_reason})' in .vim/pack/minpac/start/vim-snippets/snippets/python.snippets:27

@lpil
Copy link
Contributor

lpil commented Jan 8, 2019

Hi @EgZvor!

The python problem has been fixed now, but I like your addition to the tests. Could you remove the changes to the python snippets and keep just the new test please?

Thanks :)

(see commit cfc7e52)
An UltiSnips snippet was added into "snippets" directory which should
contain snipmate snippets only. This led to a parsing bug in UltiSnips.
@EgZvor EgZvor force-pushed the check-snippets-format branch from 7ddafeb to 7d9de2a Compare January 8, 2019 12:13
@EgZvor
Copy link
Contributor Author

EgZvor commented Jan 8, 2019

Hello, @lpil.

The python problem has been fixed now

That is good to know.

I've removed the unnecessary code.

Copy link
Contributor

@lpil lpil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@lpil lpil merged commit 1d19d09 into honza:master Jan 14, 2019
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

Successfully merging this pull request may close these issues.

2 participants