What I did is to implement #isUsed like this in e.g the hierarchy of RBLintRule:
isUsed "all my sublasses are used" ^self name ~= âRBLintRule'
this way if RBLintRule is not used, it is seen by the Critique, but all subclasses are used by default.
I implemented that in TestCase, too, and removed the explicit check for TestCase subclasses from the rule.
This is a nice thing. In the same way we can deal with abstract classes. So if someone develops an abstract class with an intent to use it, he can specify that itâs ok to use the class.
True.
Also is there any work on pragmas for classes, at some point Iâve heard something about it but canât recall.
Yes, the question is where to put it syntactically and how to save it in monticello⦠could be interesting to have.
I will try to hack a bit this weekend and see if I can add some kind of automation to marking a class as used. I.e. if you see a critic, you should be able to mark the class as being used with 1-2 clicks. If you are developing some king of facade, you should know that you will not reference it from your library.
ok. Marcus