From 5f487a90b9a3a2bf5f5e9b68ab037b352dcd5643 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:18:14 -0400 Subject: [PATCH 01/12] wip --- .github/workflows/natspec.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/natspec.yml diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml new file mode 100644 index 0000000000..645db0e49c --- /dev/null +++ b/.github/workflows/natspec.yml @@ -0,0 +1,19 @@ +name: Lintspec + +on: + pull_request: + +jobs: + lintspec: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: beeb/lintspec@v0.4.1 + # all the lines below are optional + with: + working-directory: "./" + paths: "[]" + exclude: "[]" + extra-args: "" + version: "latest" + fail-on-problem: "true" \ No newline at end of file From 2327c8562ac15d3247e39931754c492c81c74aca Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:19:24 -0400 Subject: [PATCH 02/12] wip --- .github/workflows/natspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index 645db0e49c..acb40d2c95 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -11,7 +11,7 @@ jobs: - uses: beeb/lintspec@v0.4.1 # all the lines below are optional with: - working-directory: "./" + working-directory: "./src/contracts/" paths: "[]" exclude: "[]" extra-args: "" From adb3952953f6b0cdf75e7c7178f2641c207099e1 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:21:25 -0400 Subject: [PATCH 03/12] wip --- .github/workflows/natspec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index acb40d2c95..0ce543b293 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -11,8 +11,8 @@ jobs: - uses: beeb/lintspec@v0.4.1 # all the lines below are optional with: - working-directory: "./src/contracts/" - paths: "[]" + working-directory: "./" + paths: "contracts/**/*.sol" exclude: "[]" extra-args: "" version: "latest" From 4ddcd6f4c5c3a10a5a7be160bca7f27a9f544560 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:30:36 -0400 Subject: [PATCH 04/12] wip --- .github/workflows/natspec.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index 0ce543b293..a2f06d1fa7 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -12,7 +12,8 @@ jobs: # all the lines below are optional with: working-directory: "./" - paths: "contracts/**/*.sol" + paths: | + - "contracts/**/*.sol" exclude: "[]" extra-args: "" version: "latest" From 5c18a004fe9baa3693ae3182210e52b86f62f8b5 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:31:51 -0400 Subject: [PATCH 05/12] wip --- .github/workflows/natspec.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index a2f06d1fa7..3e5575194f 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -12,9 +12,8 @@ jobs: # all the lines below are optional with: working-directory: "./" - paths: | - - "contracts/**/*.sol" - exclude: "[]" + paths: ["contracts/**/*.sol"] + exclude: [] extra-args: "" version: "latest" fail-on-problem: "true" \ No newline at end of file From 98642772771e29eedd886028e477feb2463457d1 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:34:21 -0400 Subject: [PATCH 06/12] wip --- .github/workflows/natspec.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index 3e5575194f..bea0246261 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -12,8 +12,8 @@ jobs: # all the lines below are optional with: working-directory: "./" - paths: ["contracts/**/*.sol"] - exclude: [] + paths: "[contracts/**/*.sol]" + exclude: "[]" extra-args: "" version: "latest" fail-on-problem: "true" \ No newline at end of file From b117f4d93344b2c66a5a915ba831f45b23b762a1 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:35:13 -0400 Subject: [PATCH 07/12] wip --- .github/workflows/natspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index bea0246261..b5fa0d939d 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -12,7 +12,7 @@ jobs: # all the lines below are optional with: working-directory: "./" - paths: "[contracts/**/*.sol]" + paths: "[./src/contracts/]" exclude: "[]" extra-args: "" version: "latest" From a6a868dc55ebc1aab4cbf5b2cc07948e133ed6dc Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Thu, 28 Aug 2025 10:58:34 -0400 Subject: [PATCH 08/12] wip --- .github/workflows/natspec.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml index b5fa0d939d..e85e8a93b9 100644 --- a/.github/workflows/natspec.yml +++ b/.github/workflows/natspec.yml @@ -1,5 +1,8 @@ name: Lintspec +permissions: + contents: read + on: pull_request: From 3eace3ef559bfa8b31125e74f7b3e7e4561ca798 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:04:22 -0400 Subject: [PATCH 09/12] wip --- .github/workflows/checks.yml | 24 ++++++++++++++++++++++++ .github/workflows/natspec.yml | 22 ---------------------- 2 files changed, 24 insertions(+), 22 deletions(-) delete mode 100644 .github/workflows/natspec.yml diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 39ac3d6399..730c0d1474 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -12,6 +12,30 @@ env: CLICOLOR: 1 jobs: + natspec: + name: Natspec Linting + runs-on: ubuntu-latest + steps: + - name: Harden Runner + uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0 + with: + egress-policy: block + allowed-endpoints: > + github.com:443 + release-assets.githubusercontent.com:443 + objects.githubusercontent.com:443 + raw.githubusercontent.com:443 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 + - name: Run Natspec Lint + uses: beeb/lintspec@fd5b71ffc838f63f81caf3e85e90760d124efac2 # v0.4.1 + with: + working-directory: "./" + paths: "[./src/contracts/]" # Only lint src/contracts/ + exclude: "[]" + extra-args: "" # TODO: Config + version: "latest" + fail-on-problem: "true" + typos: name: Typo Linting runs-on: ubuntu-latest diff --git a/.github/workflows/natspec.yml b/.github/workflows/natspec.yml deleted file mode 100644 index e85e8a93b9..0000000000 --- a/.github/workflows/natspec.yml +++ /dev/null @@ -1,22 +0,0 @@ -name: Lintspec - -permissions: - contents: read - -on: - pull_request: - -jobs: - lintspec: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: beeb/lintspec@v0.4.1 - # all the lines below are optional - with: - working-directory: "./" - paths: "[./src/contracts/]" - exclude: "[]" - extra-args: "" - version: "latest" - fail-on-problem: "true" \ No newline at end of file From bf29056ea02b2446ce0013406f4b0b32087d0bf6 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:10:43 -0400 Subject: [PATCH 10/12] wip --- .github/workflows/checks.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 730c0d1474..23e5743f23 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -24,10 +24,11 @@ jobs: github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 - raw.githubusercontent.com:443 + release-assets.githubusercontent.com:443 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - name: Run Natspec Lint - uses: beeb/lintspec@fd5b71ffc838f63f81caf3e85e90760d124efac2 # v0.4.1 + - uses: beeb/lintspec@fd5b71ffc838f63f81caf3e85e90760d124efac2 # v0.4.1 + # all the lines below are optional with: working-directory: "./" paths: "[./src/contracts/]" # Only lint src/contracts/ From 4914c36f129602beb55d53f6a8a9117a410794b8 Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:13:25 -0400 Subject: [PATCH 11/12] wip --- .github/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 23e5743f23..6e3e7cdb8d 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -21,6 +21,7 @@ jobs: with: egress-policy: block allowed-endpoints: > + api.github.com:443 github.com:443 release-assets.githubusercontent.com:443 objects.githubusercontent.com:443 From b174d19d099032209c8d7be4a64aa3cd2330f69c Mon Sep 17 00:00:00 2001 From: "clandestine.eth" <96172957+0xClandestine@users.noreply.github.com> Date: Fri, 29 Aug 2025 13:01:06 -0400 Subject: [PATCH 12/12] config --- .github/configs/.lintspec.toml | 78 ++++++++++++++++++++++++++++++++++ .github/workflows/checks.yml | 7 +-- 2 files changed, 80 insertions(+), 5 deletions(-) create mode 100644 .github/configs/.lintspec.toml diff --git a/.github/configs/.lintspec.toml b/.github/configs/.lintspec.toml new file mode 100644 index 0000000000..77a7f4e8c2 --- /dev/null +++ b/.github/configs/.lintspec.toml @@ -0,0 +1,78 @@ +[lintspec] +paths = ["./src/contracts/"] +exclude = [] +inheritdoc = true +notice_or_dev = false +skip_version_detection = false + +[output] +json = false +compact = false +sort = true + +[constructor] +notice = "required" +dev = "ignored" +param = "required" + +[enum] +notice = "forbidden" +dev = "required" +param = "ignored" + +[error] +notice = "forbidden" +dev = "required" +param = "ignored" + +[event] +notice = "required" +dev = "ignored" +param = "forbidden" + +[function.private] +notice = "forbidden" +dev = "required" +param = "ignored" +return = "ignored" + +[function.internal] +notice = "forbidden" +dev = "required" +param = "ignored" +return = "ignored" + +[function.public] +notice = "required" +dev = "ignored" +param = "required" +return = "required" + +[function.external] +notice = "required" +dev = "ignored" +param = "required" +return = "required" + +[modifier] +notice = "forbidden" +dev = "required" +param = "ignored" + +[struct] +notice = "required" +dev = "ignored" +param = "required" + +[variable.private] +notice = "forbidden" +dev = "required" + +[variable.internal] +notice = "forbidden" +dev = "required" + +[variable.public] +notice = "required" +dev = "ignored" +return = "ignored" diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6e3e7cdb8d..348066a4df 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -28,14 +28,11 @@ jobs: release-assets.githubusercontent.com:443 - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 - - uses: beeb/lintspec@fd5b71ffc838f63f81caf3e85e90760d124efac2 # v0.4.1 + - uses: beeb/lintspec@6722a8dd45592fd30f89c51534b3cd35b094e462 # v0.7.0 # all the lines below are optional with: working-directory: "./" - paths: "[./src/contracts/]" # Only lint src/contracts/ - exclude: "[]" - extra-args: "" # TODO: Config - version: "latest" + extra-args: "--config=.github/configs/.lintspec.toml" fail-on-problem: "true" typos: