Comments (5)
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.
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.
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.
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.
yep, true that, I'll poke around
from nicene.
Related Issues (16)
- Group aliases and imports
- Guard against hyphens in sourcecode filenames HOT 3
- Nicene documentation missing from hexdocs.pm
- Parsing error while running ConsistentFunctionDefinitions with macros HOT 1
- FileTopToBottom fails with macro-constructed module
- Check for Ecto models to be minimally documented HOT 5
- PublicFunctionsFirst does not take into account nested modules
- Group functions with the same name together.
- Credo rule to only allow importing Ecto.Query in X.Query HOT 2
- Add rules for more composable queries
- Add CI build
- Check for Ecto model location in project HOT 4
- Elixir code conventions: mandate at least some content in @doc entries
- Check for @desc fields in GraphQL schema type definitions HOT 1
- Ensure that test like modules match expected filename pattern
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nicene.