ale icon indicating copy to clipboard operation
ale copied to clipboard

Fix #4251 --file-filter option removed for cppcheck handler

Open juanmitaboada opened this issue 2 years ago • 3 comments
trafficstars

--file-filter option has been removed because using it prevents cppcheck from processing the file if it is in a different path

juanmitaboada avatar Oct 20 '23 07:10 juanmitaboada

I'll have to have a think about this before I merge it. It's probably right.

w0rp avatar Nov 05 '23 18:11 w0rp

Projects often have a structure such as src/*.cpp for all source files. Running cppcheck on the entire directly could be slow without a file filter, which I belive is the reason the filter is in place. I think the solution the problem here is the following:

  1. Edit the linter so it runs in a specific cwd.
  2. Keep --filte-filter and so it to a path relative to the cwd that was selected for the linter.

ALE has functions in ale#path that can be used for this purpose. You can do that and update the tests to test for it.

Thanks for looking into this!

w0rp avatar Dec 10 '23 11:12 w0rp

This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See :help ale-dev for information on writing tests. If your pull request is good to merge, bother w0rp or another maintainer again, and get them to merge it.

stale[bot] avatar Mar 17 '24 10:03 stale[bot]