adrienverge
Repos
86
Followers
192

Events

closed issue
Enhancement: Option to apply style

For large collections of YAML files, it would be helpful to offer an automated CLI flag to go ahead and format the files per yamllint configuration. Maybe a --apply option?

Created at 4 days ago
closed issue
Autofix support

There's a fair few issues that yamllint reports on that can be trivially autofixed. Examples include missing the document start indicator, and quoting strings. It would be great if yamllint had this functionality, as it would greatly speed up the adoption time for older codebases.

Created at 4 days ago
issue comment
Autofix support

Hello, +1 with @andrewimeson.

Closing this as a duplicate of #62, #209, #230, #231 and #269.

Created at 4 days ago

docs: Fix misleading Python API example

yamllint.linter.run("example.yaml", yaml_config) example seems yamllint.linter.run opens a given file. It's misleading.

Created at 1 week ago
pull request closed
Fix misleading Python API example

yamllint.linter.run("example.yaml", yaml_config) example seems yamllint.linter.run opens a given file. It's misleading.

Created at 1 week ago
issue comment
Can't override format in actions

Hello,

I don't see how this could come from yamllint itself, my guess is that something mixes streams in your GitHub Actions.

I'm sorry but I don't know how to help here, but if anyone can, you'd better giving more context on how you're using GitHub Actions. I suggest sharing this on a community-powered Q&A service (e.g. Stack Overflow) on GitHub Actions / yamllint topics.

Created at 1 week ago
issue comment
Exclude @ symbol check at value start

Hello,

It would need to be checked in the YAML specification, but I think name: @project.name@ is not valid YAML.

Could this Spring Boot format be a customized language, needing to be pre-processed before being YAML? It would be similar to Jinja2, or GitHub workflow languages: any YAML parser would fail to interpret such a file. See #61, #65, #128, #311, #408, #460, #462, #507...

In your specific case, maybe using quotes would work (name: "@project.name@").

Created at 1 week ago
issue comment
BUG: line-length returns wrong number of characters when using special characters

Hello,

I guess Windows doesn't load your file with the correct encoding, so Python treats ä, ü, ö as ä, ü, ö.

Have you tried helping Windows/Python use the right encoding (I guess UTF-8)? I don't know much about Windows, but I just read you can use PYTHONUTF8=1 environment variable: https://dev.to/methane/python-use-utf-8-mode-on-windows-212i.

Created at 1 week ago
issue comment
Add option to lint only on Git diff

Hello, and thank you for this interesting proposal.

Yamllint is designed to be simple and minimal, mainly to achieve performance, stability and easy maintenance. Integration with git (or any other third-party tool) isn't likely to be added. Moreover (as you've correctly imagined), yamllint needs to run on whole files, otherwise YAML source cannot be safely parsed.

That being said, it would probably be easy to write a wrapper script around yamllint, that filters out any error that isn't in diffed portions. (:warning: If you do so, beware that in some situations, modifications to a file example.yaml with a diff between lines 10…20 can trigger errors after line 20.)

Created at 1 week ago
issue comment
Upgrade from 1.28.0 to 1.29.0 provides wrong indentation: expected at least 3 (indentation) on existing files

Hello,

The fact that yamllint didn't complain about your YAML example before 1.29.0 was a bug, that @bcbrookman fixed in https://github.com/adrienverge/yamllint/pull/491.

Please see details there, but in short: either indent lines 3, 4, 8 and 9, or set indent-sequences: false in your .yamllint.yaml:

rules:
  indentation:
    indent-sequences: false
Created at 1 week ago
issue comment
YAML Spec-like formatting of Sequences of Mappings

I guess the simplest implementation would answer "yes"? What do you think?

Created at 3 weeks ago
issue comment
YAML Spec-like formatting of Sequences of Mappings

Hello,

Currently there isn't any yamllint rule that enforce such a notation.

Your "key-value pairs" example can be generalized with other types of data, which would give:

-
  name: Mark McGwire
  hr:   65
  avg:  0.278
- 
  - nested
  - list
-
  string
- 
  [inline, sequence]
- 
  &anchor
  {key: value}

Is this consistent with what you have in mind?

If yes, we could consider a new option (for example require-empty-first-line: true) in the hyphens rule. Would you like to implement this?

Created at 3 weeks ago
delete branch
adrienverge delete branch couchdb-3.3.1
Created at 3 weeks ago

Update to new upstream version

Created at 3 weeks ago
pull request closed
Update to new upstream version
Created at 3 weeks ago
issue comment
feat: Add --list-files command line option

This new feature was just released in yamllint 1.29.0.

Created at 3 weeks ago
issue comment
Allow using a list of strings in ignore configuration

This new feature was just released in yamllint 1.29.0.

Created at 3 weeks ago

yamllint version 1.29.0

Created at 3 weeks ago
adrienverge create tag v1.29.0
Created at 3 weeks ago

cli: Add --list-files command line option

This option lists the files to lint by yamllint, taking into account ignore and yaml-files configuration options.

Created at 3 weeks ago