Skip to content

Teleport to different aspects of the source code #37

Closed

Description

@dantleech

Create a feature which will allow easy navigation to / or generation of related files (e.g. from a unit test, the source, from the source the unit test, from the unit test the benchmark, etc. etc. etc.)


Below each target represents an aspect of the source code, for example

  • Source
  • Unit test
  • Benchmark

The kernel is the part of the file name (or class name) which remains constant.

When the teleporter is invoked:

  • We replace <kernel> with (.*?) and run a regex on the current file name
    for each of the targets and find a match.
  • We offer the user a choice of destinations from the remaining targets.
  • When selected the kernel is replaced in the selected target
  • The file is opened, if it does not exist it is created (using the existing
    create functionality).
teleport:
    targets:
        source: 
            pattern: "src/<kernel>.php$"
            create: default
        phpunit: 
            pattern: "tests/Unit/<kernel>Test.php$"
            create: phpunit_test
        benchmark: 
            pattern: "benchmark/<kernel>Bench.php$"
            create: benchmark

Activity

  1. changed the title [-]Facility to infer related files (e.g. test files).[/-] [+]Teleport to different aspects of the source code[/+] on Nov 2, 2017
  2. dantleech commented on Nov 8, 2017

    @dantleech
    CollaboratorAuthor

    Already done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions