Adrien Vergé
d3cd8ba332
line-length: Generalize ...-inline-mappings for corner cases
...
This commit refactors the `allow-non-breakable-inline-mappings` logic to
use YAML tokens and avoid crashes or erroneous reports on cases like:
```yaml
- {a: "http://localhost/very/very/very/very/very/very/long/url "
}
```
```yaml
dict:
{a: long long long long long long long, b: nospace}
```
```yaml
- long_line: http://localhost/very/very/long/url
```
```yaml
long_line: and+some+space+at+the+end <-- extra spaces
```
For reference see:
https://github.com/adrienverge/yamllint/pull/17#issuecomment-247805799
2016-09-19 12:39:52 +01:00
Allan Lewis
e56a7c788c
line_length: Extract inline logic to new config option
...
This commit extracts the inline mappings logic defined in the previous
commit to a separate config option, as suggested by @adrienverge. I'll
squash this into the previous commit if the change is accepted. (I named
the option slightly differently to what was suggested as I think my
proposal reads better without consulting the docs: I'd be happy to
reconsider this.)
2016-09-19 12:39:52 +01:00
Allan Lewis
d017631aff
line_length: Allow mapping values with long unbreakable lines
2016-09-12 16:31:58 +01:00
Michele Bariani
867970258e
Patch allow-non-breakable-words on '-'
2016-06-15 18:07:42 +02:00
Adrien Vergé
6b5948c06b
Tests: Reorganize common and global tests
2016-02-01 16:56:32 +01:00
Adrien Vergé
97c446907c
Rules: line-length: Add option allow-non-breakable-words
2016-01-24 22:46:10 +01:00
Adrien Vergé
350213b165
Initial commit
2016-01-14 10:46:14 +01:00