Skip to content
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

DX: make integration tests matching entries in FixerFactoryTest #5564

Merged
merged 1 commit into from Apr 18, 2021
Merged

DX: make integration tests matching entries in FixerFactoryTest #5564

merged 1 commit into from Apr 18, 2021

Conversation

kubawerlos
Copy link
Contributor

Do not allow file names with the swapped order.

There are 203 files with names having the order matching the priority and 11 files (updated in this PR) having the order swapped.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 91.849% when pulling a2ecc1e on kubawerlos:dx_integration_tests_file_names into c409758 on FriendsOfPHP:2.18.

@@ -1,5 +1,5 @@
--TEST--
Integration of fixers: array_indentation,braces.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👎
the idea was that order of rules in file name should be alphabetical, to ease searching

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Really? I would never have guessed, and counting the number of tests having not alphabetical order - which is 11 - it looks like you are the only one knowing that 😉

Anyway, what would that ease searching for? I have spotted this when working at #5563 - I've added test file single_space_after_construct,braces.test and saw it's right after the single_import_per_statement ones, so I've added the entry in tests/AutoReview/FixerFactoryTest.php right after the single_import_per_statement ones, and got not nice error as there is an entry with single_line_throw fixer.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i don't mind which way we would go, but lets make it explicit - either always alphabetical, either in order of execution.
if we allow for both, we can end up with 2 files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change in tests/AutoReview/FixerFactoryTest.php solves exactly that concern.

@keradus keradus added this to the 2.18.6 milestone Apr 18, 2021
@keradus
Copy link
Member

keradus commented Apr 18, 2021

Thank you @kubawerlos.

@keradus keradus merged commit dd17ef9 into PHP-CS-Fixer:2.18 Apr 18, 2021
@kubawerlos kubawerlos deleted the dx_integration_tests_file_names branch April 18, 2021 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants