Skip to content

This repo is to reproduce a bug I noticed while using the vim-ale plugin

License

Notifications You must be signed in to change notification settings

Nargonath/repro-vim-ale-bin-fixers-extra-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

repro-vim-ale-bin-fixers-extra-exec

This repo is to reproduce a bug I noticed while using the vim-ale plugin

Bug

The bug occurs when you use this vim-ale plugin configuration:

let g:ale_fixers = {
    \ 'javascript': ['prettier'],
\}

In a JS project, if you have the configuration above while one of your dependency have a dependency on a fixer you defined in your Vim configuration but that is not directly a dependency of your own project it is still getting run even though that's not your project configuration. I'd expect vim-ale to run only the enabled fixers that are present but also that are either available globally in your system or mentioned in your package.json dependencies.

Test case

I included a test file in this project: index.js. If you open this file with a vim instance using the above configuration and run :ALEFix the content of the file will be fixed to:

image

I don't have a global prettier executable available:

image

Here the result of npm ls prettier in the project:

image

For this case I would expect vim-ale to not fix the file since no prettier executable are intentionally added to the project or globally available.

About

This repo is to reproduce a bug I noticed while using the vim-ale plugin

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published