technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

Use :check-paths in check task if specified #2804

Open vemv opened 1 year ago

vemv commented 1 year ago

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

technomancy commented 1 year ago

Good point.

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

vemv commented 1 year ago

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

technomancy commented 1 year ago

Would you like to take a shot at this?

vemv commented 1 year ago

Not atm - sorry!