From 282508bd811952d5c8ff16793373a2a64cdcd5cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane?= Date: Tue, 15 Oct 2024 09:37:42 +0200 Subject: [PATCH] add extends & extended-by --- Cargo.lock | 2 +- arcw-lint-js/Cargo.toml | 2 +- arcw-lint-js/tests/arcs/arc-1001.md | 40 +++++++++++++++++++++++++++++ arcw-lint/src/lib.rs | 22 ++++++++++++++++ 4 files changed, 64 insertions(+), 2 deletions(-) create mode 100644 arcw-lint-js/tests/arcs/arc-1001.md diff --git a/Cargo.lock b/Cargo.lock index 433a070..f506af0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -50,7 +50,7 @@ dependencies = [ [[package]] name = "arcw-lint-js" -version = "0.1.17" +version = "0.1.20" dependencies = [ "annotate-snippets", "arcw-lint", diff --git a/arcw-lint-js/Cargo.toml b/arcw-lint-js/Cargo.toml index 2068204..7d665d2 100644 --- a/arcw-lint-js/Cargo.toml +++ b/arcw-lint-js/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "arcw-lint-js" -version = "0.1.17" +version = "0.1.20" edition = "2021" license = "MPL-2.0" rust-version = "1.60" diff --git a/arcw-lint-js/tests/arcs/arc-1001.md b/arcw-lint-js/tests/arcs/arc-1001.md new file mode 100644 index 0000000..0addcc1 --- /dev/null +++ b/arcw-lint-js/tests/arcs/arc-1001.md @@ -0,0 +1,40 @@ +--- +arc: 1001 +title: A sample proposal +description: This proposal is a sample that should be considered +author: John Doe (@johndoe), Jenny Doe +discussions-to: https://github.com/algorandfoundation/ARCs/issues/ +status: Deprecated +type: Standards Track +category: Core +created: 2020-01-01 +extended-by: 20 +replaces: 20 +--- + +## Abstract +This is the abstract for the arc. + +## Motivation +This is the motivation for the arc. + +## Specification +This is the specification for the arc. + +## Rationale +This is the rationale for the arc. + +## Backwards Compatibility +These are the backwards compatibility concerns for the arc. + +## Test Cases +These are the test cases for the arc. + +## Reference Implementation +This is the implementation for the arc. + +## Security Considerations +These are the security considerations for the arc. + +## Copyright +Copyright and related rights waived via [CC0](../LICENSE.md). diff --git a/arcw-lint/src/lib.rs b/arcw-lint/src/lib.rs index 79232b4..dd16968 100644 --- a/arcw-lint/src/lib.rs +++ b/arcw-lint/src/lib.rs @@ -117,6 +117,26 @@ pub fn default_lints() -> impl Iterator)> { }.boxed(), ), ("preamble-list-author", preamble::List("author").boxed()), + ("preamble-list-extends", preamble::List("extends").boxed()), + ( + "preamble-uint-extends", + preamble::UintList("extends").boxed(), + ), + ("preamble-list-extended-by", preamble::List("extended-by").boxed()), + ( + "preamble-uint-extended-by", + preamble::UintList("extended-by").boxed(), + ), + ("preamble-list-replaces", preamble::List("replaces").boxed()), + ( + "preamble-uint-replaces", + preamble::UintList("replaces").boxed(), + ), + ("preamble-list-superseded-by", preamble::List("superseded-by").boxed()), + ( + "preamble-uint-superseded-by", + preamble::UintList("superseded-by").boxed(), + ), ("preamble-list-requires", preamble::List("requires").boxed()), ( "preamble-uint-requires", @@ -178,6 +198,8 @@ pub fn default_lints() -> impl Iterator)> { "created", "requires", "withdrawal-reason", + "extended-by", + "extends", "replaces", "superseded-by", ])