master
fix/issues-334-pathspec-dirs.yaml
feature/plugin-2020-10-02
packaging
proto/fix-indentation
v0.1.0
v0.2.0
v0.3.0
v0.4.0
v0.5.0
v0.5.1
v0.5.2
v0.6.0
v0.7.0
v0.7.1
v0.7.2
v1.0.0
v1.0.1
v1.0.2
v1.0.3
v1.0.4
v1.1.0
v1.10.0
v1.11.0
v1.11.1
v1.12.0
v1.12.1
v1.13.0
v1.14.0
v1.15.0
v1.16.0
v1.17.0
v1.18.0
v1.19.0
v1.2.0
v1.2.1
v1.2.2
v1.20.0
v1.21.0
v1.22.0
v1.22.1
v1.23.0
v1.24.0
v1.24.1
v1.24.2
v1.25.0
v1.26.0
v1.26.1
v1.26.2
v1.26.3
v1.27.0
v1.27.1
v1.28.0
v1.29.0
v1.3.0
v1.3.1
v1.3.2
v1.30.0
v1.31.0
v1.32.0
v1.4.0
v1.4.1
v1.5.0
v1.6.0
v1.6.1
v1.7.0
v1.8.0
v1.8.1
v1.8.2
v1.9.0
${ noResults }
1 Commits (ebd6b90d3eeb329e98c77039948f00c0e7ef0189)
Author | SHA1 | Message | Date |
---|---|---|---|
Adrien Vergé | ebd6b90d3e |
anchors: Add new rule to detect undeclared or duplicated anchors
According to the YAML specification [^1]: - > It is an error for an alias node to use an anchor that does not > previously occur in the document. The `forbid-undeclared-aliases` option checks that aliases do have a matching anchor declared previously in the document. Since this is required by the YAML spec, this option is enabled by default. - > The alias refers to the most recent preceding node having the same > anchor. This means that having a same anchor repeated in a document is allowed. However users could want to avoid this, so the new option `forbid-duplicated-anchors` allows that. It's disabled by default. - > It is not an error to specify an anchor that is not used by any > alias node. This means that it's OK to declare anchors but don't have any alias referencing them. However users could want to avoid this, so a new option (e.g. `forbid-unused-anchors`) could be implemented in the future. See https://github.com/adrienverge/yamllint/pull/537. Fixes #395 Closes #420 [^1]: https://yaml.org/spec/1.2.2/#71-alias-nodes |
2 years ago |