[Issue] Adjust .editorconfig to correct the automatic formatting of db_schema_whitelist.json files #31171
Labels
Component: Code
Fixed in 2.4.x
The issue has been fixed in 2.4-develop branch
Issue: Confirmed
Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed
Priority: P2
A defect with this priority could have functionality issues which are not to expectations.
Priority: P3
May be fixed according to the position in the backlog.
Progress: ready for dev
Reproduced on 2.4.x
The issue has been reproduced on latest 2.4-develop branch
Severity: S4
Affects aesthetics, professional look and feel, “quality” or “usability”.
This issue is automatically created based on existing pull request: #31166: Adjust .editorconfig to correct the automatic formatting of db_schema_whitelist.json files
Since the .editorconfig file was changed to use two spaces for json files, this leads to problems with db_schema_whitelist.json files. All schemas are generated by the cli setup:db-declaration:generate-whitelist command and put json content formatted by the json_decode function with JSON_PRETTY_PRINT constant. This mechanism displays an indent of 4 spaces and does not add a new line at the bottom of the file. But when we change our file db_schema.xml and run setup:db-declaration:generate-whitelist cli command, it updates the contents of the db_schema_whitelist.json file, and when we opened it in the IDE, the .editorconfig add a new line at the bottom and we can't delete it, because it is always adding at the end on saving the file.
Preconditions
Magento 2.4-develop
Related Pull Requests
#30062
Steps to reproduce
Actual result
The code has been refactored and a new line added at the end

Expected result
The code is not formatted. A "No lines changed, content is properly formated" message appears

"No lines changed, content is properly formated"
The text was updated successfully, but these errors were encountered: