'migrate' removes line break(s) at the end of a file
codeworrior opened this issue · comments
Frank Weigel commented
While working on SAP/openui5@c782ce9 , I encountered the following issue with the ui5-migration tooling:
In files that are not touched otherwise, line feeds at the end are removed. While this doesn'T cause build or runtime issues, it creates a lot of noise in changes and the only workaround seems to be to revert those changes manually, which is cumbersome.
To reproduce, you can execute the following commands
cd openui5
git checkout 6555a38
ui5-migration migrate src/sap.ui.core/src/sap/ui/dom/jquery
Tobias Sorn commented
simplified example using replaceGlobals
task
before 8 lines:
sap.ui.define(['sap/ui/thirdparty/jquery'], function(jQuery) {
"use strict";
return jQuery("a");
});
after 6 lines:
sap.ui.define(['sap/ui/thirdparty/jquery'], function(jQuery) {
"use strict";
return jQuery("a");
});