You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yamllint/yamllint
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
8 years ago
..
conf line_length: Extract inline logic to new config option 8 years ago
rules line-length: Generalize ...-inline-mappings for corner cases 8 years ago
__init__.py yamllint version 1.3.2 9 years ago
cli.py feat(cli): Colour output only on TTY 9 years ago
config.py Tests: cli: Detect and handle the `-d ''` case 9 years ago
linter.py linter: Fix UnicodeError when parsing comments 9 years ago
parser.py linter: Fix UnicodeError when parsing comments 9 years ago