Skip to content

Having tests colocated with source code marks the directory as a test directory #2088

@Kauko

Description

@Kauko

In my current project, we try to colocate our tests with our source code, meaning that our namespaces src/clj and src/cljc contain tests and actual code.

In our project.clj we have

:source-paths ["src/clj" "src/cljc"]
  :test-paths ["src/clj" "src/cljc" "test/clj" "test/cljc"] ;; also run tests from src files
  :resource-paths ["resources" "target/cljsbuild"]

This results in src/clj and src/cljc being marked as test directories.

screenshot 2018-11-23 at 13 40 05

I can get around this by marking the folders as source directories manually, but that is overwritten every time I import Leiningen changes.

Could this be fixed by having priorities for the different markings, and if Cursive thinks a directory can be marked as both source and test, it would be marked as a source directory?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugMarks issues describing bugsreleasedMarks issues which have had the fixes released in a stable build

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions