leiningen icon indicating copy to clipboard operation
leiningen copied to clipboard

Use :check-paths in check task if specified

Open vemv opened this issue 1 year ago • 4 comments

Hi there!

Becase check.clj checks only :source-paths, it is not intuitive to make lein check also check test/ namespaces.

(One might have guessed that with-profile +test would work - but nope)

A simple fix would seem to also honor :test-paths if the test profile is active.

(Note that always enabling it might fail, since the :test profile can add :dependencies otherwise absent)

There's the workaround of adding :profiles {:test {:source-paths ["test"]}} but if feels pretty wrong.

Cheers - V

vemv avatar Oct 19 '22 11:10 vemv

Good point.

What if it defaulted to using :source-paths only if :check-paths was absent? Then it could be easily overridden.

technomancy avatar Oct 21 '22 17:10 technomancy

This also SGTM and probably it's easier to convey/maintain :)

vemv avatar Oct 21 '22 19:10 vemv

Would you like to take a shot at this?

technomancy avatar Oct 21 '22 21:10 technomancy

Not atm - sorry!

vemv avatar Oct 21 '22 23:10 vemv