Skip to content

Do not analyze excluded files #157

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

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

j6s
Copy link
Contributor

@j6s j6s commented Aug 19, 2021

resolves #156

I noticed, that FileFinder::findSrcFiles has an $excluded parameter, that is never specified - but I didn't want to do too many changes in this PR.

@j6s j6s force-pushed the 156-exclude-files-while-building branch 2 times, most recently from f7cf391 to b2c9562 Compare August 19, 2021 13:20
@j6s j6s force-pushed the 156-exclude-files-while-building branch from b2c9562 to 5aad59d Compare August 19, 2021 13:22
@j6s
Copy link
Contributor Author

j6s commented Aug 19, 2021

Discussion: As far as I can see, this means that the exclusion from configuration in StatementBuilder::selectOrigins can be removed because they are not part of the set in the first place, right?

@carlosas carlosas merged commit f698c36 into carlosas:master Nov 12, 2021
@carlosas
Copy link
Owner

Yes, this was done in this way thinking that excluded files would not be part of the origin set, but they would be for the destination set. Meaning that ExcludedFile would not be checked for rule violations but would be checked as a relation for other classes.
On a later version, I made the rules recognize relations for classnames that are not in the map, so the only benefit of still having the excluded files in the map would be looking for them with inderect selectors (like classes that implement xyz). Anyway the memory consumption of this decision could be heavy in some code structures (like your case), so I think the benefit of having "hard exclusion" is higher 👍

I'm already thinking on a secondary traverser (only for classnames/parents/interfaces) to be able to indirectly detect these excluded files (or even vendors), but this will probably come in a future major version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Out of memory despite excluding files
2 participants