NREL / OpenStudio-measure-tester-gem

Other
3 stars 0 forks source link

Automate style fix to special characters in arguments, and to extract units to arg.setUnits #6

Open DavidGoldwasser opened 6 years ago

DavidGoldwasser commented 6 years ago

There are about 1000 style errors left in 'nrel_published' and they for the most part fall into these six categories.

Seems like the last two could be automated, I'm wondering if there is a reason not to do this?

here is the logic

  1. If any part of argument name is between () then remove the remove the () and content in between and make a new `arg.setUnits("*")
  2. After addressing units, if argument name still has special characters then remove them, if want to be more strict and only autofix if at end of string that is fine.

For the missing description and modeler description, I can't just copy and past text between the XML and ruby string because special characters and quotes are handled differently.

nllong commented 6 years ago

Right now we don't have the concept of automated openstudio style fixes. We could write a rake task to clean this up, but it would be "use at your own risk".