I'm actually working on the web application which was made using technologies such as asp.net core, c#, angular, ef core. For the version control and CD we use Azure DevOps. As a team we try to follow Agile rules. When the developer starts the ticket, he creates a new branch forked from master and when he finishes he makes a Pull Request. Then the team members can have a look at the PR and add comments.
I'm thinking if it's a good behavior to removed unused directives (e.g. using blahnamespace.foo.bar
) from a file which is not related to the pull request.
Just imagine a simple case. As a part of your task/ticket, you need to add some extra fields to class User
plus some extra validation stuff. During the development, you found some unused directives in some other classes, so you decided to remove them to keep application code cleaner. If such a clean up is done for the single case then it's fine. The problem appears when the pull request is massive and tens of classes were modified. From my perspective, it's hard to make a code review because as a coder I want to check only the classes where the business logic was added or modified.
Should it be forbidden to do such a clean up in classes which are not related to the task/ticket?