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

Move extra_args to the end of the rubocop command #19

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NickLaMuro
Copy link

For some rubocop executables, a --file or --path option might be necessary to target a specific file to run the parser. I myself use a modified form of rubocop-git (with an addition to support the flags above, as well as the --format flag) instead of the default rubocop command to only look at offenses I have made in my branch.

To allow using rubocop-git using the g:vimrubocop_rubocop_cmd, the last argument in the string includes the --file argument to be paired up with the l:filename when running the :RuboCop command.

Swapping these arguments should retain the previous functionality just fine, while allowing for the use-case described above.

Note: It was chosen to have l:extra_args last in the list versus a:current_args since a --file option is more useful to be applied to every call of :RuboCop instead of on-demand via the a:current_args.

For some rubocop executables, a `--file` or `--path` option might be
necessary to target a specific file to run the parser.  This currently
would need to be the last argument in the string to be paired up with
the `l:filename` when running the RuboCop command.

Swapping these arguments should retain the previous functionality just
fine, while allowing for the use-case described above.

Note:  It was chosen to have `l:extra_args` last in the list versus
`a:current_args` since a `--file` option is more useful to be applied to
every command instead of on demand via the `a:current_args`.
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.

None yet

1 participant