paleite / eslint-plugin-diff

Run ESLint on your changes only
https://npm.im/eslint-plugin-diff
MIT License
172 stars 13 forks source link

Make the diff TIME based not branch or ID based. #62

Open burtonator opened 5 months ago

burtonator commented 5 months ago

Is your feature request related to a problem? Please describe.

With a team working on stale branches it can become confusing which code should trigger the diff.

Describe the solution you'd like It would be a lot better to make the diff based on time not based on changeset ID or branch.

This way I can just say "any code from Jan 1, 2024" and not even keep any branches.

Describe alternatives you've considered none

Additional context Add any other context or screenshots about the feature request here.

burtonator commented 4 months ago

This issue is bigger than it seems.

Due to squash and merge it's not possible to use a change set ID as the diff point because as soon as someone merges a PR it creates a new change set and invalidates the diff branch.

What it means that CI will work up until you squash it into master , then it will fail.

I think the only reasonable way this would work is to either:

  1. keep a fingerprint file stored with the actual lines to grandfather in (including their changeset ID)
  2. use a cutoff point sometime in the future - like 2 weeks in the future.

the first one will require some engineering work to get this to work.