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

Restructure the files in the repository #692

Closed
14 tasks done
jrfnl opened this issue Jul 14, 2018 · 1 comment · Fixed by #738
Closed
14 tasks done

Restructure the files in the repository #692

jrfnl opened this issue Jul 14, 2018 · 1 comment · Fixed by #738
Labels
Milestone

Comments

@jrfnl
Copy link
Member

jrfnl commented Jul 14, 2018

Related to #601 and #688.

To do:

Preparation:

  • Finalize the list of categories and sniff name changes.

Sniffs:

  • Move sniffs to their new categories, adjust the namespace of the sniffs and if necessary, update the docblocks.
  • For those sniffs which will receive another name: rename the sniff file, the class name and if necessary, update the docblocks.

Unit tests:

  • Move all unit test files to their new categories, rename the file to have UnitTest.php as the suffix instead of the current SniffTest.php, adjust the namespace of the test and if necessary, update the docblocks.
  • Move the unit test case files to live in the same directory as the unit test file, rename the files to mirror the file name of the unit test file with UnitTest.inc as their suffix.
    Where there are more than one test files for a sniff, the test files will be numbered, i.e. UnitTest.1.inc etc.
  • Rename the unit test files for the Sniff file (BaseClass directory) to use the UnitTest.php suffix.
  • Move the unit test case files for the Sniff file (sniff-examples/utility-functions) to the BaseClass directory, rename the files to mirror the file name of the unit test file with UnitTest.inc as their suffix.
  • Update the bin/generate-forbidden-names-test-files script to reflect these changes.
  • Review the phpunit.xml files to assess if any changes are needed.

Other:

  • Review and if necessary update the Readme and Contributing documentation.
    In Contributing, a section should be added documenting the sniff name and categorization guidelines.
  • Run the CS check and if necessary, adjust any inline annotations which need adjusting.
  • Update all open PRs which target the 9.0.0 branch to comply with these changes as well and rebase them if necessary.
    Also: make sure that the new sniff no longer contain any work-arounds for PHPCS < 2.3.0.
  • Open PRs for the existing framework based rulesets to use the new sniffnames.
  • Open PRs for the new polyfill based rulesets - Proposal: add dedicated rulesets repos for frequently used polyfill libraries #733 - with rulesets using the new sniffnames.

### Open questions:
There is redundant information in the sniff and test file docblocks at the moment - most have the sniff name in the docblock. They also all have a @category tag which is currently set to PHP.
Should this redundant information be updated or removed ?

For that matter, should the file doc blocks - which generally contain a subset of the same information which is contained in the class doc blocks - be removed all together ?

Depending on the decision taken about these questions, the PHPCompatibility native PHPCS ruleset may need adjusting.

👉 The open question has been moved to a dedicated issue #734 to be addressed separately.

@jrfnl
Copy link
Member Author

jrfnl commented Sep 16, 2018

FYI: We've had a call today in which we've finalized the list of categories and sniff name changes. A lot will be changing.

To get a preview of what's to come, you can view the list with the sniffs and their future categories and names as decided today: https://docs.google.com/spreadsheets/d/1jqx2200mgRXUCGriozAZQNOenQsJw6RiWTDEHd5FAd8/edit?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant