Automated refactoring

Just an initial demo map, so that you don't start with an empty map list ...

Get Started. It's Free
or sign up with your email address
Rocket clouds
Automated refactoring by Mind Map: Automated refactoring

1. user interface

1.1. command line

1.2. semantic patch -- 'spatch'

1.3. editor plugin

1.4. python script

2. Multi-language

2.1. cheetah

2.2. python

2.3. js?

3. refactorings

3.1. remove function calls

3.1.1. based on context ?

3.2. remove decorators

3.2.1. refactor string% within @HTMLLiteral.wraps

3.3. insert function calls

4. Implementation

4.1. get an AST

4.2. modify the AST

4.2.1. python function

4.2.1.1. input ast

4.2.1.2. search for relevant parts (subtree)

4.2.1.3. test for any extra conditions

4.2.1.4. replace the subtree

4.2.1.4.1. recursion / reuse

4.2.1.5. output modified ast

4.2.2. spatch

4.3. unparse the modified AST

5. full project refactoring

5.1. find imports

5.2. enumerate files to refactor

5.3. enable recursive refactoring, across modules

6. testing

6.1. tokenization

6.1.1. python / cheetah

6.1.2. save as XML & compare

6.2. refactorization

6.2.1. save output and compare

6.2.2. should be functional test (non-xml)

6.3. unit test

6.3.1. ast functions

6.3.1.1. input / output can be XML

6.3.2. class methods

6.4. run with py.test

7. division of code

7.1. Yelp internal

7.2. Yelp github