Coder Social home page Coder Social logo

Comments (5)

uesteibar avatar uesteibar commented on July 17, 2024

Hi @halostatue! Not sure I'm following, test/lib/context/employees_test.exs would (according to the rule) indeed be wrong and should be test/context/employees_test.exs right? I'm sure I'm missing something here tho, so if you could clarify that it'd be very helpful.

from nicene.

halostatue avatar halostatue commented on July 17, 2024

It took me a bit to recall what I meant from months ago. However, it should not be incorrect to have test/lib/context/employees_test.exs, even if it’s a little unusual. More problematic might be something like test/module/lib/function_test.exs that would be testing lib/module/lib/function.ex (Module.Lib.Function). The test here should probably be verifying that the first path part for a test file is test/ and not lib/.

from nicene.

uesteibar avatar uesteibar commented on July 17, 2024

Ah I see what you mean! Yes that is correct, we should indeed be checking for the first part of the path only 👍

from nicene.

halostatue avatar halostatue commented on July 17, 2024

The main question would be whether source_file.filename is a partial path test/foo/bar.exs or a full path /home/user/projects/foo_bar/test/foo/bar.exs. If it’s the former, the test is really easy: match?("test/" <> _, source_file.filename). If it’s the latter…

from nicene.

uesteibar avatar uesteibar commented on July 17, 2024

yep, true that, I'll poke around 😸

from nicene.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.