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

Using vim-vspec causes "Error: vint: E492: Not an editor command": describe #330

Open
mbrinkme opened this issue Oct 22, 2019 · 2 comments

Comments

@mbrinkme
Copy link

I use vspec (https://github.com/kana/vim-vspec) to test vim functions. DSL Keywords are e.g. describe, context, it.

describe '#AddDebugger'
  context 'when is xy project'
    it 'inserts the string byebug'
      ...
    end
  end
end

Filename: add_debugger_spec.vim

This code produces this error:
Using vim-vspec causes "Error: vint: E492: Not an editor command": describe '#AddDebugger' (see vim-jp/vim-vimlparser)

How could I handle these keywords that is originally no vimscript? Could I add some config to .vintrc.yaml in someway? Could I alternative ignore these files (*_spec.vim) in the vint config file?

@blueyed
Copy link
Member

blueyed commented Oct 22, 2019

There's no easy way currently AFAIK - but you could e.g. visually select and manually run vint - on it then etc..

Would be nice if this would work however.
I am using Vader for tests myself, where the blocks ("Execute (…):") seem to work with vint, but I am not using vint as a linter by default for the test files (.vader) currently.

I think it is not really trivial, since every block would need to be handled as a separate script, and then there's also before/after etc, which would need to be handled together (before/after) the main block (for local vars etc).

@rbong
Copy link

rbong commented Jan 1, 2022

Less-than-ideal workaround for pipelines until vspec support is added:

rm -rf t/
vint .

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

3 participants