SAP / ui5-migration

ARCHIVED - A tool to support the migration of UI5 projects by adapting code for new UI5 framework versions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tooling sometimes breaks the source formatting

codeworrior opened this issue · comments

While working on SAP/openui5@c782ce9 , I encountered the following issue with the ui5-migration tooling:

The migration tooling sometimes breaks the source formatting, especially the indent of closing brackets. This might be a follow-up issue of #29, but I think I encountered it more often than #29.

Before

					...
					if (selectedItem == subItem) {
						popupSelectedItem = popupSubItem;
					}
				}

			}

			var newGroup = new NavigationListItem({
				expanded: true,
			...

After (note the curly braces which have moved, as has the follow-up statement)

					...
					if (selectedItem == subItem) {
						popupSelectedItem = popupSubItem;
				}

			}

			

		}

		var newGroup = new NavigationListItem({
				expanded: true,
		...

To reproduce, you can execute the following commands

cd openui5
git checkout 6555a38
ui5-migration migrate src/sap.tnt/src/sap/tnt/NavigationListItem.js