diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1aa963f51d8c..46ef4335bd951 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -136,7 +136,7 @@ jobs: - name: Checkout EIP Repository uses: actions/checkout@47fbe2df0ad0e27efb67a70beac3555f192b062f - - uses: ethereum/eipw-action@b8de7ea9ad5cb842301e63898afb996c451c18cf + - uses: ethereum/eipw-action@be3fa642ec311d0b8e1fdb811e5c9b4ada3d3d93 id: eipw with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/config/eipw.toml b/config/eipw.toml index 9783f2d328fbc..603bcd26f24e5 100644 --- a/config/eipw.toml +++ b/config/eipw.toml @@ -2,78 +2,88 @@ kind = "set-default-annotation" name = "status" value = "Stagnant" -annotation_type = "warning" +annotation_level = "warning" [[modifiers]] kind = "set-default-annotation" name = "status" value = "Withdrawn" -annotation_type = "warning" +annotation_level = "warning" -[lints.preamble-refs-title] -kind = "preamble-proposal-ref" -name = "title" +[lints.markdown-re-eip-dash] +kind = "markdown-regex" +mode = "excludes" +pattern = '(?i)eip[\s]*[0-9]+' +message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" -[lints.preamble-discussions-to] -kind = "preamble-url" -name = "discussions-to" +[lints.preamble-date-created] +kind = "preamble-date" +name = "created" -[lints.preamble-re-title] +[lints.preamble-re-description-eip-dash] kind = "preamble-regex" -name = "title" +name = "description" mode = "excludes" -pattern = '(?i)standar\w*\b' -message = "preamble header `title` should not contain `standard` (or similar words.)" +pattern = '(?i)eip[\s]*[0-9]+' +message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" + +[lints.preamble-re-description-colon] +kind = "preamble-regex" +name = "description" +mode = "excludes" +pattern = ":" +message = "preamble header `description` should not contain `:`" [lints.preamble-refs-description] kind = "preamble-proposal-ref" name = "description" +prefix = "eip-" +suffix = ".md" -[lints.preamble-date-created] -kind = "preamble-date" -name = "created" +[lints.preamble-enum-category] +kind = "preamble-one-of" +name = "category" +values = [ + "Core", + "Networking", + "Interface", +] -[lints.preamble-requires-ref-description] -kind = "preamble-require-referenced" +[lints.preamble-re-description] +kind = "preamble-regex" name = "description" -requires = "requires" +mode = "excludes" +pattern = '(?i)standar\w*\b' +message = "preamble header `description` should not contain `standard` (or similar words.)" -[lints.markdown-html-comments] -kind = "markdown-html-comments" -name = "status" -warn_for = [ - "Draft", - "Withdrawn", -] +[lints.preamble-re-title-erc-dash] +kind = "preamble-regex" +name = "title" +mode = "excludes" +pattern = '(?i)erc[\s]*[0-9]+' +message = "proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)" -[lints.markdown-re-erc-dash] -kind = "markdown-regex" +[lints.preamble-re-description-erc-dash] +kind = "preamble-regex" +name = "description" mode = "excludes" pattern = '(?i)erc[\s]*[0-9]+' message = "proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)" -[lints.markdown-link-first] -kind = "markdown-link-first" -pattern = "(?i)(?:eip|erc)-[0-9]+" [lints.markdown-refs] kind = "markdown-proposal-ref" +prefix = "eip-" +suffix = ".md" -[lints.preamble-enum-status] -kind = "preamble-one-of" -name = "status" -values = [ - "Draft", - "Review", - "Last Call", - "Final", - "Stagnant", - "Withdrawn", - "Living", -] +[lints.preamble-req-withdrawal-reason] +kind = "preamble-required-if-eq" +when = "status" +equals = "Withdrawn" +then = "withdrawal-reason" -[lints.preamble-req] -kind = "preamble-required" +[lints.preamble-order] +kind = "preamble-order" names = [ "eip", "title", @@ -81,37 +91,34 @@ names = [ "author", "discussions-to", "status", + "last-call-deadline", "type", + "category", "created", + "requires", + "withdrawal-reason", ] + [lints.preamble-requires-status] +prefix = "eip-" +suffix = ".md" kind = "preamble-requires-status" requires = "requires" status = "status" flow = [ [ - "Draft", - "Stagnant", -], + "Draft", + "Stagnant", + ], ["Review"], ["Last Call"], [ - "Final", - "Withdrawn", - "Living", - "Moved", -], -] - -[lints.markdown-req-section] -kind = "markdown-section-required" -sections = [ - "Abstract", - "Specification", - "Rationale", - "Security Considerations", - "Copyright", + "Final", + "Withdrawn", + "Living", + "Moved", + ], ] [lints.markdown-order-section] @@ -128,19 +135,6 @@ sections = [ "Copyright", ] -[lints.preamble-re-description-erc-dash] -kind = "preamble-regex" -name = "description" -mode = "excludes" -pattern = '(?i)erc[\s]*[0-9]+' -message = "proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)" - -[lints.preamble-req-withdrawal-reason] -kind = "preamble-required-if-eq" -when = "status" -equals = "Withdrawn" -then = "withdrawal-reason" - [lints.markdown-rel-links] kind = "markdown-relative-links" exceptions = [ @@ -164,167 +158,16 @@ exceptions = [ '^https://www\.rfc-editor\.org/rfc/.*$', ] -[lints.preamble-requires-ref-title] -kind = "preamble-require-referenced" -name = "title" -requires = "requires" - -[lints.markdown-link-status] -kind = "markdown-link-status" -status = "status" -flow = [ - [ - "Draft", - "Stagnant", -], - ["Review"], - ["Last Call"], - [ - "Final", - "Withdrawn", - "Living", - "Moved", -], -] - -[lints.preamble-file-name] -kind = "preamble-file-name" -name = "eip" -prefix = "eip-" -suffix = ".md" - [lints.preamble-req-category] kind = "preamble-required-if-eq" when = "type" equals = "Standards Track" then = "category" -[lints.preamble-author] -kind = "preamble-author" -name = "author" - -[lints.preamble-no-dup] -kind = "preamble-no-duplicates" - -[lints.markdown-re-eip-dash] -kind = "markdown-regex" -mode = "excludes" -pattern = '(?i)eip[\s]*[0-9]+' -message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" - -[lints.preamble-date-last-call-deadline] -kind = "preamble-date" -name = "last-call-deadline" - -[lints.preamble-re-title-eip-dash] -kind = "preamble-regex" -name = "title" -mode = "excludes" -pattern = '(?i)eip[\s]*[0-9]+' -message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" - -[lints.preamble-re-description] -kind = "preamble-regex" -name = "description" -mode = "excludes" -pattern = '(?i)standar\w*\b' -message = "preamble header `description` should not contain `standard` (or similar words.)" - -[lints.preamble-len-requires] -kind = "preamble-length" -name = "requires" -min = 1 - -[lints.preamble-len-title] -kind = "preamble-length" -name = "title" -min = 2 -max = 44 - -[lints.preamble-re-title-colon] -kind = "preamble-regex" -name = "title" -mode = "excludes" -pattern = ":" -message = "preamble header `title` should not contain `:`" - -[lints.preamble-re-title-erc-dash] -kind = "preamble-regex" -name = "title" -mode = "excludes" -pattern = '(?i)erc[\s]*[0-9]+' -message = "proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)" - -[lints.preamble-len-description] -kind = "preamble-length" -name = "description" -min = 2 -max = 140 - -[lints.preamble-order] -kind = "preamble-order" -names = [ - "eip", - "title", - "description", - "author", - "discussions-to", - "status", - "last-call-deadline", - "type", - "category", - "created", - "requires", - "withdrawal-reason", -] - -[lints.preamble-enum-type] -kind = "preamble-one-of" -name = "type" -values = [ - "Standards Track", - "Meta", - "Informational", -] - -[lints.preamble-re-discussions-to] -kind = "preamble-regex" -name = "discussions-to" -mode = "includes" -pattern = "^https://ethereum-magicians.org/t/[^/]+/[0-9]+$" -message = "preamble header `discussions-to` should point to a thread on ethereum-magicians.org" - -[lints.preamble-list-requires] -kind = "preamble-list" -name = "requires" - -[lints.preamble-enum-category] -kind = "preamble-one-of" -name = "category" -values = [ - "Core", - "Networking", - "Interface", -] - -[lints.preamble-list-author] -kind = "preamble-list" -name = "author" - -[lints.preamble-trim] -kind = "preamble-trim" - [lints.preamble-eip] kind = "preamble-uint" name = "eip" -[lints.preamble-re-description-colon] -kind = "preamble-regex" -name = "description" -mode = "excludes" -pattern = ":" -message = "preamble header `description` should not contain `:`" - [lints.markdown-json-cite] kind = "markdown-json-schema" language = "csl-json" @@ -904,21 +747,195 @@ schema = """ """ help = "see https://github.com/ethereum/eipw/blob/master/eipw-lint/src/lints/markdown/json_schema/citation.json" +[lints.preamble-no-dup] +kind = "preamble-no-duplicates" + +[lints.preamble-requires-ref-description] +kind = "preamble-require-referenced" +name = "description" +requires = "requires" + +[lints.preamble-re-title] +kind = "preamble-regex" +name = "title" +mode = "excludes" +pattern = '(?i)standar\w*\b' +message = "preamble header `title` should not contain `standard` (or similar words.)" + +[lints.preamble-re-title-eip-dash] +kind = "preamble-regex" +name = "title" +mode = "excludes" +pattern = '(?i)eip[\s]*[0-9]+' +message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" + +[lints.preamble-date-last-call-deadline] +kind = "preamble-date" +name = "last-call-deadline" + +[lints.markdown-req-section] +kind = "markdown-section-required" +sections = [ + "Abstract", + "Specification", + "Rationale", + "Security Considerations", + "Copyright", +] + +[lints.markdown-link-status] +prefix = "eip-" +suffix = ".md" +kind = "markdown-link-status" +status = "status" +flow = [ + [ + "Draft", + "Stagnant", +], + ["Review"], + ["Last Call"], + [ + "Final", + "Withdrawn", + "Living", + "Moved", +], +] + +[lints.preamble-re-title-colon] +kind = "preamble-regex" +name = "title" +mode = "excludes" +pattern = ":" +message = "preamble header `title` should not contain `:`" + +[lints.preamble-list-requires] +kind = "preamble-list" +name = "requires" + +[lints.preamble-len-description] +kind = "preamble-length" +name = "description" +min = 2 +max = 140 + +[lints.preamble-requires-ref-title] +kind = "preamble-require-referenced" +name = "title" +requires = "requires" + +[lints.markdown-html-comments] +kind = "markdown-html-comments" +name = "status" +warn_for = [ + "Draft", + "Withdrawn", +] + +[lints.preamble-author] +kind = "preamble-author" +name = "author" + [lints.preamble-uint-requires] kind = "preamble-uint-list" name = "requires" +[lints.preamble-len-requires] +kind = "preamble-length" +name = "requires" +min = 1 + +[lints.markdown-link-first] +kind = "markdown-link-first" +pattern = "(?i)(?:eip|erc)-([0-9])+" + +[lints.markdown-re-erc-dash] +kind = "markdown-regex" +mode = "excludes" +pattern = '(?i)erc[\s]*[0-9]+' +message = "proposals must be referenced with the form `ERC-N` (not `ERCN` or `ERC N`)" + +[lints.preamble-list-author] +kind = "preamble-list" +name = "author" + +[lints.preamble-enum-type] +kind = "preamble-one-of" +name = "type" +values = [ + "Standards Track", + "Meta", + "Informational", +] + +[lints.preamble-len-title] +kind = "preamble-length" +name = "title" +min = 2 +max = 44 + +[lints.preamble-discussions-to] +kind = "preamble-url" +name = "discussions-to" + +[lints.preamble-req] +kind = "preamble-required" +names = [ + "eip", + "title", + "description", + "author", + "discussions-to", + "status", + "type", + "created", +] + +[lints.preamble-re-discussions-to] +kind = "preamble-regex" +name = "discussions-to" +mode = "includes" +pattern = "^https://ethereum-magicians.org/t/[^/]+/[0-9]+$" +message = "preamble header `discussions-to` should point to a thread on ethereum-magicians.org" + +[lints.preamble-refs-title] +kind = "preamble-proposal-ref" +name = "title" +prefix = "eip-" +suffix = ".md" + +[lints.preamble-enum-status] +kind = "preamble-one-of" +name = "status" +values = [ + "Draft", + "Review", + "Last Call", + "Final", + "Stagnant", + "Withdrawn", + "Living", +] + +[lints.preamble-trim] +kind = "preamble-trim" + [lints.preamble-req-last-call-deadline] kind = "preamble-required-if-eq" when = "status" equals = "Last Call" then = "last-call-deadline" -[lints.preamble-re-description-eip-dash] -kind = "preamble-regex" -name = "description" -mode = "excludes" -pattern = '(?i)eip[\s]*[0-9]+' -message = "proposals must be referenced with the form `EIP-N` (not `EIPN` or `EIP N`)" +[lints.preamble-file-name] +kind = "preamble-file-name" +name = "eip" +prefix = "eip-" +suffix = ".md" +[lints.markdown-no-backticks] +kind = "markdown-no-backticks" +pattern = "(?i)(eip|erc)-[0-9]+" +[lints.markdown-headings-space] +kind = "markdown-headings-space"