Uwe Kleine-König
unread,Jan 28, 2022, 4:00:04 AM1/28/22You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Package: yamllint
Version: 1.26.3-1
Severity: normal
Hello,
$ cat l.yaml
---
mylist:
- |
blablub
};
$ yamllint l.yaml
Traceback (most recent call last):
File "/usr/bin/yamllint", line 33, in <module>
sys.exit(load_entry_point('yamllint==1.26.3', 'console_scripts', 'yamllint')())
File "/usr/lib/python3/dist-packages/yamllint/cli.py", line 210, in run
prob_level = show_problems(problems, file, args_format=args.format,
File "/usr/lib/python3/dist-packages/yamllint/cli.py", line 106, in show_problems
for problem in problems:
File "/usr/lib/python3/dist-packages/yamllint/linter.py", line 203, in _run
for problem in get_cosmetic_problems(buffer, conf, filepath):
File "/usr/lib/python3/dist-packages/yamllint/linter.py", line 140, in get_cosmetic_problems
for problem in rule.check(rule_conf,
File "/usr/lib/python3/dist-packages/yamllint/rules/indentation.py", line 580, in check
for problem in _check(conf, token, prev, next, nextnext, context):
File "/usr/lib/python3/dist-packages/yamllint/rules/indentation.py", line 346, in _check
'wrong indentation: expected %d but found %d' %
TypeError: %d format: a number is required, not NoneType
I guess the right thing to do would be to output something like:
l.yaml
5:5 error syntax error: expected <block end>, but found '}' (syntax)
(At least this is what happens if I force expected to be a number in
/usr/lib/python3/dist-packages/yamllint/rules/indentation.py", line 346)
Best regards
Uwe
-- System Information:
Debian Release: bookworm/sid
APT prefers testing-debug
APT policy: (700, 'testing-debug'), (700, 'stable-security'), (700, 'stable-debug'), (700, 'testing'), (700, 'stable'), (600, 'unstable'), (500, 'unstable-debug'), (500, 'oldstable-updates'), (500, 'oldstable-debug'), (500, 'oldoldstable'), (500, 'oldstable'), (499, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386, armhf, arm64
Kernel: Linux 5.15.0-3-amd64 (SMP w/4 CPU threads)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages yamllint depends on:
ii python3 3.9.7-1
ii python3-pathspec 0.9.0-1
ii python3-pkg-resources 59.6.0-1.2
ii python3-yaml 5.4.1-1+b1
yamllint recommends no packages.
yamllint suggests no packages.
-- no debconf information