yogthos / migratus

MIGRATE ALL THE THINGS!
651 stars 95 forks source link

Option to ignore regex pattern warning #242

Open sirmspencer opened 1 year ago

sirmspencer commented 1 year ago

In our set up, I generate a .clj file to match the generated edn file, and they stay in the same migration directory.

image

We don't need to see a warning for every .clj file that won't match the regex.

yogthos commented 1 year ago

Perhaps we could add an optional config flag for allowed extensions and then pass it to migratus.migrations/warn-on-invalid-migration. Should be pretty straight forward, let me know if you'd be ok to do a pr for that.

sirmspencer commented 1 year ago

I can give it a try.

sirmspencer commented 1 year ago

@yogthos Can you add a development guide in the readme or a CONTRIBUTE.md?

yogthos commented 1 year ago

What would you like to see there. There's not much to it, you just check out and run with either deps or lein, and just do a PR once the tests are passing.

sirmspencer commented 1 year ago

Good question. You mention tests, which is something I would expect, but not sure what test suite you are using, as an example. How could I dev / test from within my project? Lein checkouts? I know just enough to look for things, but a quick guide would make that easier.

Do you have a slack channel somewhere? This ticket might be redundant with a larger plan I am thinking of. I have permission to work on this on company time so this would all be something I would work on once we talk it out.

yogthos commented 1 year ago

Oh yeah, I'm on Clojurians slack https://clojurians.net with the same id, just ping me on there and we can chat through it. If you want to test a new version locally as a library, the easiest would be to bump up the version in project.clj and run lein install on your machine. This will install the version to your local repo, and you can reference it from your project.