Closed ClFeSc closed 3 years ago
Maybe we could look into expanding the refactoring to fully conform with Kent Becks "Smalltalk Best Practice Patterns", but that is not a must and shouldn't be of high priority for now (in my opinion at least).
Maybe we could look into expanding the refactoring to fully conform with Kent Becks "Smalltalk Best Practice Patterns", but that is not a must and shouldn't be of high priority for now (in my opinion at least).
I'm not sure it's possible to do this all automated. When thinking of cases like long lines I can't see a simple program to be able to split it up in multiple lines without making it look extremely weird in at least some cases. And it would take forever to implement. My focus were our own style guidelines as well as some basic stuff like the spaces around the @
. Maybe the next group working on this project can extend it further. Furthermore, I'm currently working on a linter that should alert us when something is wrong, but I'm not going to implement a whole book of styleguides into it. But it will be able to tell us issues that the auto-refactor can't fix.
I think I won't do much more for this respecting the time remaining.
I've written a script to automatically perform some refactoring. It currently does the following:
@
@
aM2
,a M2
,A M2
andAM2
withanM2
,an M2
,An M2
,AnM2
I've added a second commit showing the result of running the script on the current
dev
. We can safely remove this commit before merging anything as it can be reproduced by running the script again (which takes about 3.5 seconds).There is also the possibility of automatically committing changes of the script with the CI. This has the drawback of not running the tests on the newly pushed changes since GitHub doesn't run the CI on commits pushed by the token that the CI gets. The workaround would be to add a personal token to the repository, but we can't do that on our own.
That's why my suggestion would be to just run this script locally from time to time.
What are your thought on this?