sky-uk / bslint

A linter for the BrightScript language.
BSD 3-Clause "New" or "Revised" License
24 stars 9 forks source link

Refactor styling handler to avoid repetead if statements #125

Closed vasiuadriana closed 7 years ago

vasiuadriana commented 7 years ago

@DanieleSassoli I started the refactoring by using a simple dictionary rather than a dispatcher, so a lot of the if statements have disappeared. Right now is also more efficient, the if statements won't be parsed, you have fast access in the dictionary for each method that you need

Next steps:

I am happy to tackle the above points in another PR if you are happy to this one.