Download the PHP package lavary/fixit without Composer
On this page you can find all versions of the php package lavary/fixit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Package fixit
Short Description Track your Fixme comments real quick with just a command!
License MIT
Homepage https://github.com/lavary/fixit
Informations about the package fixit
Fixit
Track your "Fixme" comments real quick with just a command!
Installation
After the package is installed, a command-line utility named fixit
is copied to your ~/.composer/vendor/bin
directory, if installed globally.
To make sure the command is available from anywhere, make sure ~/.composer/vendor/bin
is added to your PATH
environment variable. Otherwise, you'll have to use the full path to the command.
You can also install it for a specific project; In that case, it is copied to the
vendor/bin
directory of the project.
To see the available arguments and options, you may run the following command:
Usage
Fixit tracks and collects all the comments in specified files marked with certain keywords set in the configuration file or as command options.
Comments can be in the following form across the code base. However, it can be configured in the configuration file.
Here's a basic usage:
By default, comments starting with keywords fixme
, fix-me
, todo
, to-do
are collected by the collector. However, this can be configured in the configuration file (More on this below) or the command option --keyword
:
As you can see, it is possible to specify several keywords at the same time.
The output could be something like:
Note: If you choose one keyword for a certain issue (fixme, bug, bottleneck, etc), just stick to it to make sure no comment remain untracked.
Output Types
By default, the output is rendered in a tabular format. However, you can specify the output by output_type
option in the command line or the configuration file. Three types are supported out of the box: table
, json
, and list
.
Which outputs:
Or as a list:
Include or Exclude Certain Directories or Files
It is possible to limit the collection to a limited number of directories or files (inside those directories).
To do this, you can use --include
, --exclude
, --include_file
, and --exclude_file
command options.
The above command will scan all the files and directories inside path/to/code
directory except for Controller
and Model
directories.
We can also exclude a certain file:
The above command will scan all files inside path/to/code
directory except for Controller
directory and Model/User.php
file.
You can use these options as many time as required, to specify the desired directories and files to scan.
By default
vendor
directory is ignored.
All these options can also bet set in the configuration file.
Configuration
All the options mentioned above can be set via a YAML
configuration file, which is shipped with the package.
The configuration file looks like this:
The option keyword
is the list of keywords we need to fetch from the files while scanning. You can put any keyword based on your team's conventions.
The pattern
and titles
will be covered in the Advanced Usage
section of this README
file.
The next set of options is very straightforward as we've already used them on the command line. the options include
, exclude
, include_dir
, exclude_dir
all accept an array as value:
The option output_type
specifies the render type which can be table
, json
, or list
.
Note All these settings are overridden by their command option counterpart
Editing the Configuration File
To use your own configuration file you need to make a copy of your own.
To make a copy run the following command:
You need to specify the path you want to keep the configuration file. It can be anywhere in your system. Finally, you can go to the specified directory to edit the settings as desired.
To use the configuration file just pass it to fixit scan
command via --configuration
option:
Advanced Usage
As you probably remember from the configuration file, there are to more options that you can use if the current settings do not fulfill your requirements. For example, if you want to have more complex comment structures for tracking your "todo" comments, you can change the pattern
and titles
options accordingly.
titles
specifies the column titles when showing the results.
If You Need Help
Please submit all issues and questions using GitHub issues and I will try to help you.
License
Fixit is free software distributed under the terms of the MIT license.
All versions of fixit with dependencies
symfony/finder Version ^3.1
symfony/config Version ^3.1
symfony/yaml Version ^3.0