Comments (6)
We can add this. I have very little available time at the moment for open source projects. If you want to help you can add this or I will do it but that will take some time.
from twigcs.
Hello,
As of https://twig.symfony.com/doc/2.x/coding_standards.html it is stated :
Put one (and only one) space after the start of a delimiter ({{, {%, and {#) and before the end of a delimiter (}}, %}, and #}):
My understanding of this is that you should format like this :
{% set classes = [
'block',
'block-' ~ configuration.provider|clean_class,
'block-' ~ plugin_id|clean_class,
] %}
But you can still use custom rules with Twigcs.
from twigcs.
My understanding of this is that you should format like this
That's how we work around right now. But this kind of formatting does not look well.
from twigcs.
I personally got quite used to it, it saves 2 lines in vertical space. But that's pure opinion without any facts.
Twigcs is not about forcing you to do this. The tool is meant to allow you to enforce the rules you want in your project. In your case you should go with a custom Ruleset so you can set up the coding style that suits you.
from twigcs.
Yes, but the rule (DelimiterSpacing) has no configuration options to change that behavior. So besides the Ruleset we will have to develop a new Rule for that.
from twigcs.
I am not quite familiar with Twig lexer. So I think it ls better to leave this for you.
Thanks.
from twigcs.
Related Issues (20)
- Please publish the new release (for symfony 6 use) HOT 2
- Problem when multiple lines HOT 7
- Invalid version value HOT 1
- Support request: How to disable verification of a code fragment? HOT 2
- Support config files with `.php` extension HOT 1
- Spacing of default values in macros HOT 2
- SEVERITY_IGNORE not working
- RegEngine is not happy with breaklines
- Unused variable should not be trigger if the child mutate a parent's variable. HOT 1
- Support for ??? "Empty Coalesce" operator HOT 1
- Variables set and used in loop should not be marked as unused HOT 2
- PHP 8.2 deprecations
- Supporting `createTemplate()`
- Configure cache file location HOT 2
- Avoid useless whitespace control
- Detect Twig depreciations
- PHP 8.3 support HOT 3
- [IMPORTANT] Future of the library HOT 3
- Release for the PHP 8.3 support HOT 2
- Signature cannot be verified for the 6.3.0 release 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 twigcs.