kibit icon indicating copy to clipboard operation
kibit copied to clipboard

Allow custom rules

Open kapilreddy opened this issue 10 years ago • 8 comments
trafficstars

  • Modify run and external-run to accept custom rules
  • Create unifier/prep'ed rules inside check-expr and check-reader. This makes passing custom rules simpler

kapilreddy avatar Aug 20 '15 05:08 kapilreddy

@danielcompton I think all the things have been fixed according to your comments. Would it be possible to get this change merged ?

kapilreddy avatar Aug 24 '15 18:08 kapilreddy

Hey sorry I haven't had the chance to sit down and look at this properly yet, my weekend was full. I hope to get to this in the next week or so. Sorry for the delay.

danielcompton avatar Aug 24 '15 21:08 danielcompton

Hey Daniel, Take your time.

kapilreddy avatar Aug 25 '15 07:08 kapilreddy

I've merged this. Thanks!

danielcompton avatar Aug 29 '15 06:08 danielcompton

Hi @danielcompton! This one still isn't merged and it looks like an accident. Are there any plans to finally merge this one together with the #141 (a #140-related PR with the documentation update)?

marksto avatar Sep 13 '21 16:09 marksto

I'm not convinced this is a good idea. If you're competent enough and familiar enough with kibit to write your own custom rule, surely it wouldn't be much of a stretch to assume you could fork the project. That way you could also open a PR and contribute back to the project more easily. It would be a shame if through custom rules we have several people implement the same good custom rule that should really be upstream

port19x avatar Apr 18 '23 07:04 port19x

Counterpoint: using kibit on a specialized or closed-source codebase (at a job, in a personal project, etc) will have opportunities for helpful custom rules that 1) aren't generally useful and/or 2) can't even be shared due to privacy/copyright concerns.

For example, I want to migrate my codebase from using two custom functions to a single unified custom function. There's no need for kibit in general to have a (func2 (func1 ?arg1 ?arg2)) (unified-func ?arg1 ?arg2)) rule.

NoahTheDuke avatar Apr 18 '23 14:04 NoahTheDuke

Counterpoint: using kibit on a specialized or closed-source codebase (at a job, in a personal project, etc) will have opportunities for helpful custom rules that 1) aren't generally useful and/or 2) can't even be shared due to privacy/copyright concerns.

For example, I want to migrate my codebase from using two custom functions to a single unified custom function. There's no need for kibit in general to have a (func2 (func1 ?arg1 ?arg2)) (unified-func ?arg1 ?arg2)) rule.

Valid point! I totally forgot that you might want to have rules for functions outside of clojure.core, especially in larger codebases

port19x avatar Apr 19 '23 05:04 port19x