Comments (7)
- Make the code case-insensitive. This would include changing the pattern by adding an "i" after the closing slash, and change other string comparison sections to make the subject match case of the comparison.
I did this intentionally to reduce the performance impact of the rule. it might make sense make it configurable so people which prefer e.g. lowercase // todo
can be supported
2. Add an optional "@" to the start of the pattern.
I preface my todo comments with "@" for IDE highlighting reasons.
how do your comments look like, please provde a example
3. Use named capture groups in the regular expression:
I am fine with the code as is right now
4. Make your variable interpolation consistent.
feel free to provide a PR if this is something important to you :-)
from phpstan-todo-by.
- Add an optional "@" to the start of the pattern.
I preface my todo comments with "@" for IDE highlighting reasons.
I also add "@" for the same reason, it looks like this: https://www.jetbrains.com/help/phpstorm/using-todo.html#add_pattern_filter_todo
e.g. TODO@lars -> ...
from phpstan-todo-by.
I would love support for @todo
, as that is the format we typically use.
from phpstan-todo-by.
I would love support for
@todo
, as that is the format we typically use.
could you give a complete example of how your comment looks like?
looks like some of you guys are talking about // @todo
and some are talking about // TODO@xy
from phpstan-todo-by.
Here is a couple of examples of an @todo
from one of my projects:
/**
* @todo - Convert to standard Drupal $content code.
*/
...
// @todo Decide to fix all the broken instances of class as a string
Some comments have the hyphen, some don't.
from phpstan-todo-by.
I made a pull request with my suggested changes, and added in support for php doc comments.
I tested this on a large project and saw no significant performance loss compared to PHPStan not using this plugin.
from phpstan-todo-by.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
from phpstan-todo-by.
Related Issues (20)
- Set level by env HOT 3
- Regression: 0.1.7 crashes when current Git project has no tags, even if no todo comments reference a version HOT 6
- multi git repo setup HOT 1
- expire comment by composer package version HOT 4
- Expire comment by config value HOT 6
- TodoByPackageVersionRule: backtrack limit error HOT 5
- Idea: Support Symfony's deprecation-contracts HOT 18
- BC Break: re-organize config file
- Idea: todo expire todo when PR is released HOT 7
- by a semantic version constraint matched against a Composer dependency not working HOT 8
- Improve Expiration Date recognition HOT 2
- TodoByVersionRule should not match date comments HOT 1
- Issue caused by a single-line block format comment is printed incorrectly HOT 1
- http caching HOT 4
- Reduce http requests HOT 1
- DX: ticket-rule: add "see $url" tip HOT 2
- DX: Define error identifiers HOT 4
- Respect configurable vendor folder location HOT 5
- Get an error for a TODO without an expiration constraint HOT 1
- support full github issue urls HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpstan-todo-by.