Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
automated-typo3-update
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Automated-TYPO3-Update
automated-typo3-update
Commits
5428b380
Unverified
Commit
5428b380
authored
7 years ago
by
Daniel Siepmann
Browse files
Options
Downloads
Patches
Plain Diff
TASK: Document new feature in docs
parent
28329844
Branches
Branches containing commit
1 merge request
!78
Feature/72 refactor sniff architecture
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Documentation/source/configuration.rst
+21
-0
21 additions, 0 deletions
Documentation/source/configuration.rst
Documentation/source/extending.rst
+18
-0
18 additions, 0 deletions
Documentation/source/extending.rst
with
39 additions
and
0 deletions
Documentation/source/configuration.rst
+
21
−
0
View file @
5428b380
...
...
@@ -156,3 +156,24 @@ Example:
.. code:: bash
--runtime-set removedConstantConfigFiles "/Some/Absolute/Path/*.yaml"
.. _configuration-features:
features
--------
Configure where to look for configuration files defining the feature mappings. Default is
``Configuration/Features/*.yaml`` inside the standard itself. Globing is used, so placeholders like
``*`` are possible, see https://secure.php.net/manual/en/function.glob.php
Using :file:`ruleset.xml`:
.. code:: xml
<config name="features" value="/Some/Absolute/Path/*.yaml"/>
Example:
.. code:: bash
--runtime-set features "/Some/Absolute/Path/*.yaml"
This diff is collapsed.
Click to expand it.
Documentation/source/extending.rst
+
18
−
0
View file @
5428b380
...
...
@@ -24,6 +24,24 @@ The following resources might be helpful during working with ``phpcs``:
- :file:`CodeSniffer/File.php`
.. _extending-features:
Features
--------
Sniffs do not always add errors or warnings in our standard, instead for more flexibility, we use
them to find specific "tokens", e.g. class names. We then attach so called *Features* to sniffs to
work on that token.
E.g. we deliver the Feature ``LegacyClassnameFeature`` which will check whether a given class name
is legacy and should be replaced. As class names may occur in many places like type hints or php doc
blocks, the sniffs will detect the class names and the feature will work on them.
Features can be attached to the sniffs. A feature has to implement the ``FeatureInterface`` and will
work on tokens found by sniffs.
To attach a Feature to Sniffs, provide a yaml-configuration, see :ref:`configuration-features`.
.. _extending-tests:
Tests
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment