8000 Suppress warnings caused by map([], ' "x" ') by Kuniwak · Pull Request #259 · Vimjas/vint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Suppress warnings caused by map([], ' "x" ') #259

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 6 commits into from
Jun 18, 2018
Merged

Conversation

Kuniwak
Copy link
Member
@Kuniwak Kuniwak commented Jan 5, 2018

Before this patch, ProhibitUnnecessaryDoubleQuote report warnings caused by the code:

map([0, 1, 2], ' "x" ')
"                ^^^
"                Prefer single quoted strings (see Google VimScript Style Guide (Strings))

After this patch, Vint will suppress the warnings:

map([0, 1, 2], ' "x" ')
" (no warnings)

Discussion

This feature can be an option of ProhibitUnnecessaryDoubleQuote.
But I feel this option is useless. Because the following code is noisy:

map([0, 1, 2], ' ''x'' ')

@Kuniwak Kuniwak changed the title WIP: Fix false positives caused by map) WIP: Fix false positives caused by map([], '""') Jan 5, 2018
@Kuniwak Kuniwak changed the title WIP: Fix false positives caused by map([], '""') Fix false positives caused by map([], '""') Jan 5, 2018
@Kuniwak Kuniwak changed the title Fix false positives caused by map([], '""') Suppress warnings caused by map([], ' "x" ') Jan 5, 2018
@Kuniwak Kuniwak self-assigned this Jan 5, 2018
@Kuniwak Kuniwak requested a review from Coacher January 5, 2018 09:28
@thinca
Copy link
thinca commented Jan 8, 2018
map([0, 1, 2], ' \'x\' ')

Did you mean:

echo map([0, 1, 2], ' ''x'' ')

@Kuniwak
Copy link
Member Author
Kuniwak commented Jan 10, 2018

@thinca You're right. I have the mistake.

EDIT: I fixed it.

@Kuniwak Kuniwak merged commit 4b4bc15 into master Jun 18, 2018
@Kuniwak Kuniwak deleted the fix-map-string branch June 18, 2018 07:01
@Kuniwak Kuniwak mentioned this pull request Jun 19, 2018
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
0