You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suppose that choose just one of the two ways would be better..
So, to understand the best option, why did you find more practical having the results grouped by rules? 🙂
By grouping by rules you can focus more quickly on resolving in your source code.
I think resolving by rules is more efficient than resolving by files because in this last case you would have to jump frequently from a rule context to another.
Also, I would like to use this approach as the default approach, but I think also that it's best give to the developers the option to switch to the file-by-file approach based on their preferences or needs at a specific time.
My 2cents: consistency with other tools in the PHP ecosystem is also important so I would check what other tools like psalm and deptrac do and stick to that
Thanks @micheleorselli, I think your suggestion is very acceptable, but in my head the reasoning was this:
When using PHPUnit you focus on class-by-class testing, so it's okay that the output is grouped by classes / test files, but when using PHPArkitect your focus is on the rules (for me it is) so should be more useful grouping by rules.
Also, I believe that in my very little experience with tools like psalm the approach is rightly the same of PHPUnit.
Psalm, PHPUnit and deptrac I think that they don't allow you to group by rules instead of files. Have you ever tried those tools grouping by rules @ricfio ?
@AlessandroMinoccheri
It's true that the others tools does not grouping by rules, but its are focused on single classes/files instead on the whole application.
In my opinion PHKArkitect should be more focused on rules (involving the architecture of the whole application), so could be more useful grouping by rules instead that by files... or simply to have this option.
In my opinion, it's better to have the list of files sorted by name because I can fix those in order.
But, do you wanna try to create a PR for this feature?
Activity
fain182 commentedon Nov 15, 2021
I suppose that choose just one of the two ways would be better..
So, to understand the best option, why did you find more practical having the results grouped by rules? 🙂
ricfio commentedon Nov 15, 2021
By grouping by rules you can focus more quickly on resolving in your source code.
I think resolving by rules is more efficient than resolving by files because in this last case you would have to jump frequently from a rule context to another.
Also, I would like to use this approach as the default approach, but I think also that it's best give to the developers the option to switch to the file-by-file approach based on their preferences or needs at a specific time.
micheleorselli commentedon Nov 21, 2021
My 2cents: consistency with other tools in the PHP ecosystem is also important so I would check what other tools like psalm and deptrac do and stick to that
ricfio commentedon Nov 21, 2021
Thanks @micheleorselli, I think your suggestion is very acceptable, but in my head the reasoning was this:
Also, I believe that in my very little experience with tools like psalm the approach is rightly the same of PHPUnit.
AlessandroMinoccheri commentedon Dec 2, 2021
Psalm, PHPUnit and deptrac I think that they don't allow you to group by rules instead of files. Have you ever tried those tools grouping by rules @ricfio ?
ricfio commentedon Dec 2, 2021
@AlessandroMinoccheri
It's true that the others tools does not grouping by rules, but its are focused on single classes/files instead on the whole application.
In my opinion PHKArkitect should be more focused on rules (involving the architecture of the whole application), so could be more useful grouping by rules instead that by files... or simply to have this option.
AlessandroMinoccheri commentedon Dec 3, 2021
In my opinion, it's better to have the list of files sorted by name because I can fix those in order.
But, do you wanna try to create a PR for this feature?