Comments (30)
@neersighted Could you paste the output of Vint on a file with some problems from your machine? I can check the lines against the regex, and see if there's some kind of issue there.
from ale.
Sure... Something funky is going on, as some quick print-debugging is showing that HandleGCCFormat
is not getting called. If it matters, my shell is fish.
Here's some vint output on my system:
plugin/unimpaired.vim:6:11: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:16:28: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:16:44: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:41:31: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:42:32: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:43:44: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:43:47: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:63:13: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:298:10: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:413:13: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:415:17: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:416:16: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:416:40: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:417:17: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:419:17: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:422:16: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:433:13: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
from ale.
Here's the same thing with ale's formatting string:
plugin/unimpaired.vim:6:11: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:16:28: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:16:44: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:41:31: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:42:32: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:43:44: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:43:47: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:63:13: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:298:10: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:413:13: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:415:17: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:416:16: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:416:40: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:417:17: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:419:17: warning: Use robust operators `==#` or `==?` instead of `==` (see Google VimScript Style Guide (Matching))
plugin/unimpaired.vim:422:16: warning: Prefer single quoted strings (see Google VimScript Style Guide (Strings))
plugin/unimpaired.vim:433:13: warning: Use robust operators `=~#` or `=~?` instead of `=~` (see Google VimScript Style Guide (Matching))
from ale.
Hmm, do you have bash
installed on your machine? That might be the issue.
from ale.
If the answer to that is "no," do you have a good old Bourne Shell (sh
) installed?
from ale.
That is indeed the issue, when I override SHELL to bash, it works.
from ale.
Maybe the shebang line in the Bash wrapper script is to blame. What's the output of which bash
?
from ale.
/usr/bin/bash
, however, this is arch, so /usr/bin
is a symlink and the real bash is /bin/bash
.
from ale.
If you edit stdin-wrapper
and change the shebang line to #!/usr/bin/env bash
, does that work?
from ale.
It does nothing, and it looks like stdin-wrapper
never runs. I do believe the issue is in Vim, probably when it tries to execute stdin-wrapper. By the way, mktemp
has a --suffix
option, no need for gymnastics.
from ale.
I'm guessing something with the generated command
is going wrong.
This is what I get on my system:
/home/neersighted/.config/nvim/bundles/ale//stdin-wrapper .vim vint -w --no-color -f "{file_path}:{line_number}:{column_number}: {severity}: {description} (see {reference})
I'm wondering, why is there only one quote?
from ale.
...the missing quote fixed it.
from ale.
That quote is suspicious. @KabbAmine added that, and it was conspicuously only running if there was a single quote there. Which was... very odd.
from ale.
It works for me in bash and in fish with both quotes. I can send a PR with the quote fix, shebang change and mktemp change if you'd like.
from ale.
I pushed a commit now with just that fix for the quote.
@KabbAmine Do you want to test Vint linting again on your machine? You had the issue originally with the quote.
from ale.
Ah, I recall now. Somehow... for some reason, the double quote appears in the echoed message if you add it. I'll see what I can do about that.
from ale.
For now, it's dinner and X-Files time.
from ale.
Check out the branch fix-vint-issues
, with the commit referenced above. I don't know what's going on with the double quote issue, but I can avoid it, and it seems to work. Try it out and let me know how it goes.
from ale.
I also noticed separately that vint has a -s
flag which I could add an option for, and which could be applied in Travis for this repository. I'll make it happen after this bug has been fixed.
from ale.
As a matter of fact, master works fine and fix-vint-issues does not.
from ale.
I don't see quotes with fish, zsh, or bash on master.
fix-vint-issues only works on bash for me.
from ale.
Why don't we just use escaped singlequotes for the whole thing? And I'd prefer to keep the vint parsing based on GCC, if possible. The fewer lines of code, the better.
from ale.
The trouble is that somehow quotes can appear in the text. I get some lines like so: Unexpected EOL (see ynkdir/vim-vimlparser)"
I don't quite understand how that's happening.
from ale.
Try logging everything to a file in your stdin-wrapper so you can look over the raw text? The layers of abstraction might be munging things.
from ale.
I think I have found the issue. NeoVim does not show the issue on my machine. I looked at the documentation for jobstart()
in NeoVim, and it said that it executes command strings as if you had passed the commands like split(&shell) + split(&shellcmdflag) + [command]
. So I did exactly that for Vim 8. That seems to fix the issue on my machine.
from ale.
Curiously, the job_start()
documentation for Vim 8 says the command works better as a String on Windows and a List on Unix, so... I'll keep using a string on Windows.
from ale.
Sweet! I can confirm master functions for me in fish and bash.
from ale.
Lists are really the proper way to execute commands anyway, shell parsing makes things screwy when you use strings.
from ale.
Yeah. I don't know why Vim's documentation says Windows is different, but I'll just accept that. I'll consider this issue closed.
from ale.
Good job guys 👍
from ale.
Related Issues (20)
- Use hamllint as a fixer
- Fixers + nvim + split windows causes jumps
- Multiple node processes with large RAM usage on opening file HOT 2
- Statusline info cache doesn't refresh correctly with integrating with third-party sources like coc.nvim HOT 1
- Support hurlfmt as fixer and linter
- Add support for include-what-you-use
- Add support for basedpyright
- rust ALEGoToDefinition does not trigger any action HOT 1
- ALE linting .tsx as .ts files when using Biome
- [Biome] Linter not usable
- Should/could ALE pass --no-fix argument to ruff when linting (to override project configuration)? HOT 5
- ALEHover text not appearing in floating preview HOT 1
- Cannot use ALE in MacVim when the file is opened via the right-click context menu or the File > Open dialog in MacVim HOT 1
- error loading shared lib: libicui18n.so.73 HOT 1
- json linting with jq doesn't report errors correctly
- On Windows 11, shell=pwsh/powershell continues breaking ALE lint HOT 1
- `write-good` plugin need make separate files that only have text
- cspell option “-c config.yaml” not work
- `sqlfluff` does not work in Neovim, throws an error when trying to lint an opened file HOT 1
- Signs cannot be customized HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ale.