Traits make everything extremely complex. If Lint would see traits we would have an explosion of cases to consider for each rule: should it run on classes (yes/no), should it run on traits (yes/no), should it run on class methods (yes/no), should it run on trait methods (yes/no), should it run on imported trait methods (yes/no). Out of the box most lint rules do not make sense on traits and even break when being run on traits.
The change model of the refactoring engine can create traits, remove traits and add and remove methods from traits. As well it supports the definition of trait imports and undoing these operations. Traits are not reified in the code model itself though, but that could be added following RBClass and RBMetaclass if somebody is interested in doing that. Refactorings do not work on traits, but again the existing refactorings probably don't make sense or wouldn't work because they are targeted at classes. Again, new refactorings could be written if the code model would be reified. Lukas On 4 December 2010 17:57, aizcorbe <[email protected]> wrote: > > That sounds strange, since i could want to refactor traits too. Also, i'm > working on a set of Lint rules to check some specific Trait issues. > Shouldn't be any way to select some Traits to run Lint rules over them (some > things different than their methods)? > -- > View this message in context: > http://forum.world.st/quick-question-about-refactoring-scope-tp3072683p3072758.html > Sent from the Pharo Smalltalk mailing list archive at Nabble.com. > > -- Lukas Renggli www.lukas-renggli.ch
