DaylightingSociety / WhereAreTheEyes

Surveillance Detection and Mapping App
https://eyes.daylightingsociety.org
BSD 3-Clause "New" or "Revised" License
230 stars 18 forks source link

Android automatic refactor - ObsoleteLayoutParam #27

Closed luiscruz closed 6 years ago

luiscruz commented 7 years ago

Hi,

I am developing a tool to automatically refactor Android applications with the goal of improving energy efficiency. This pull request has the changes generated while applying the rule "ObsoleteLayoutParam".

While developing your application's views you might be specifying attributes in a view's artefact that are not necessary due to the nature of its parent. In this PR, those attributes were replaced by a comment.

I have made a previous validation of the changes and they seem correct. Unfortunately, this tool is not able keep the original whitespace of the files, so comparison without ignoring whitespace might be confusing. Please consider the changes and let me know if you agree with them.

Best, Luis

milo-trujillo commented 7 years ago

Other than adjusting whitespace it looks like the only differences your tool made were removing a couple instances of layout_centerVertical and one instance of layout_weight. Is this correct? It's admittedly hard to read the diff with all of the whitespace refactored.

luiscruz commented 7 years ago

Thanks for your feedback @milo-trujillo

Yes, you're correct! Regarding the whitespace, I have to find a way of manipulating XML without having to regenerate the whole file.

I have analyzed your project against other rules. But these were the only issues it could find ;)

milo-trujillo commented 6 years ago

Unfortunately out codebase has deviated so far since this pull request that it is no longer reasonable to integrate it.