Skip to content

[Issue] Adjust .editorconfig to correct the automatic formatting of db_schema_whitelist.json files #31171

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
m2-assistant bot opened this issue Dec 4, 2020 · 2 comments · Fixed by #31166
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”.

Comments

@m2-assistant
Copy link

m2-assistant bot commented Dec 4, 2020

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.

image

Preconditions

Magento 2.4-develop

Related Pull Requests

#30062

Steps to reproduce

  1. Open any db_schema_whitelist.json file in PhpStorm
  2. And run Reformat Code
  3. Press Ctrl+S to save file

image
image

Actual result

The code has been refactored and a new line added at the end
refactor_before

Expected result

The code is not formatted. A "No lines changed, content is properly formated" message appears
pr_after attempt to refactor_refactor
"No lines changed, content is properly formated"

@m2-assistant m2-assistant bot added Priority: P3 May be fixed according to the position in the backlog. Severity: S4 Affects aesthetics, professional look and feel, “quality” or “usability”. labels Dec 4, 2020
@engcom-Bravo engcom-Bravo added Progress: ready for dev Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch labels Dec 7, 2020
@engcom-Bravo engcom-Bravo added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label Dec 7, 2020
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @engcom-Bravo
Thank you for verifying the issue. Based on the provided information internal tickets MC-39707 were created

Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Dec 22, 2020
@magento-engcom-team magento-engcom-team added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Dec 24, 2020
@magento-engcom-team
Copy link
Contributor

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #31166 by @DmitryFurs in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming 2.4.3 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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”.
Projects
Archived in project
2 participants