If you’ve configured DeepSource for a GitHub repository, on each pull request, analysis is triggered on added and modified files of the changeset. For instance, in this pull request, issues are raised against
masonite/response.py, not just on newly introduced lines. Take a look at the run here.
We went ahead with the approach to abide by the Boy scout rule.
Boy scout rule: Always leave the campground cleaner than you found it.
The campground here, used to be all touched files — that way, developers are encouraged to fix all issues in the file even if a single line of change is made; eventually leading to a healthier code base. We asked our users about this approach and they thought otherwise. Reason being, the changes in the pull requests started becoming out of context. Best practice of pull requests (or) change lists is to keep the change exactly within the context of the feature / fix and nothing beyond it.
We’ve rolled out this improvement as part of our recent release. From now, on pull requests issues will be reported only on newly added (or) modified lines and newly introduced issues on the file due to changed lines. The boy scout rule still applies but the playground is scoped to the line, not the file.
GitHub / Pull request changes
For instance, in the pull request shown above, only line
65 is changed. Thus, the DeepSource check will report only the following issues:
DeepSource / History / Run
Squash the issues sticking to the context. Cheers!