Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure forbidden-imports rule checks files directly inside layers #64
Make sure forbidden-imports rule checks files directly inside layers #64
Changes from 1 commit
b4dde41
935407c
d8c063d
92ed506
737ed42
892f5de
249e5b2
6d512bc
5731cc9
74c02d1
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: the idea is to give the
check
function of rules the folder of the FSD root, so by putting the layers insrc
, we're not actually testing how it's going to besuggestion: we can add a second optional argument to
parseIntoFsdRoot
— the root path of the folders, then we can avoid havingsrc
here in the structureThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, now I see that in other tests, you access
.children[0]
to overcome this issue. That's also fine, although you forgot to do it in the positive case. I still think that it would be cleaner with an optional root path argument thoughThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I had to put all the files into /src because of the problem I wrote about in the PR description. Indeed I forgot to add
.children[0]
for the positive case, thanks for catching that.I would be happy to pass that optional argument to
parseIntoFsdRoot
but I see that it accepts only 1 argument. Maybe you implemented the second parameter in some branch that has not yet been merged to the master?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant to suggest for you to add that second parameter :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also took the liberty to unresolve this conversation. Usually, I prefer to mark threads as resolved when the comment was either fully addressed or it was decided not to address it, but this comment is still relevant partially. Let me know if you'd like to add that second parameter, or I can do it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, got it. No problem, I'll add that tomorrow. I think it will be useful in further test cases and also I don't like
.children[0]
too much.