credo icon indicating copy to clipboard operation
credo copied to clipboard

Add new check for bad ecto migration timestamps

Open bglusman opened this issue 5 years ago • 1 comments

Hopefully this is a welcome PR and not out of scope since it's targeting an issue from a specific hex library? Just thought it would be useful as I'm guilty of occasionally hand editing these files and have been bit by this once or twice! Thanks, let me know if I can do anything further to help/improve!

bglusman avatar Apr 01 '21 21:04 bglusman

I see that tests are failing, but that seems to be the case on master and for all the PR's... not sure if anything I can do to help there, but my new tests are passing in any case locally.

bglusman avatar Apr 05 '21 16:04 bglusman

I apologize for the age/inactivity on this. I should have done a better job at resolving this properly. 😥

Please feel free to re-open this at your discretion.

rrrene avatar Feb 03 '23 21:02 rrrene

Hmm, I don't seem to have permission to reopen this. I still think it would be a useful check to add if you're open to?

bglusman avatar Feb 03 '23 22:02 bglusman

Maybe I misunderstood the code, especially the code comments (why tolerate a year and/or a month of difference?).

All in all, this seemed to me like this is a solution to manual errors that occur in your team/codebase. Since this concerns itself with timestamps and detecting errors in hand-edited timestamps, I am not sure if we can solve this in a manner that covers all use-cases, which is exactly what custom checks were invented for :+1:

rrrene avatar Feb 03 '23 22:02 rrrene