theseion / Fuel

Fuel, the Smalltalk object serializer
https://theseion.github.io/Fuel
MIT License
26 stars 12 forks source link

Cleanup newlines and blanks in "Fuel" packages #258

Closed astares closed 2 years ago

astares commented 2 years ago

We cleanup newlines and blanks in methods, see https://github.com/pharo-project/pharo/issues/10396 (which is a general task) and https://github.com/pharo-project/pharo/issues/10483 (for the specific subtask for the Fuel packages)

To fix it @theseion just needs to run the script found in https://github.com/pharo-project/pharo/issues/10483 in Pharo on latest development version and commit (also based on latest version):

badCases := SystemNavigation default allMethodsSelect: [ :each | each sourceCode trimRight size ~= each sourceCode size ].

fixInPackage := badCases select: [:each | each package name beginsWith: 'Fuel' ].

fixInPackage do: [:each |
    | refactoring classOrTrait |
    classOrTrait := each traitSource ifNil: [ each methodClass ] ifNotNil: [ each traitSource innerClass ].
    refactoring := RBAddMethodChange compile: each sourceCode trimRight in: classOrTrait for: nil.               
    refactoring execute 
]
theseion commented 2 years ago

Thanks @astares. I've published 3.0.4 with the changes and opened a PR with Pharo.

astares commented 2 years ago

@theseion Thanks for caring!