Skip to content

Do not analyze excluded files - #157

Merged
carlosas merged 1 commit into
carlosas:masterfrom
j6s:156-exclude-files-while-building
Nov 12, 2021
Merged

Do not analyze excluded files#157
carlosas merged 1 commit into
carlosas:masterfrom
j6s:156-exclude-files-while-building

Conversation

@j6s

@j6s j6s commented Aug 19, 2021

Copy link
Copy Markdown
Contributor

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

j6s commented Aug 19, 2021

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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