From de50a87f58c1734839077d42a2dc03b5a518e80c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kejser=20Jensen?= Date: Sat, 22 Aug 2026 13:09:48 +0200 Subject: [PATCH 1/3] Update ast-grep rules to use the latest version --- .github/workflows/ast-grep-scan.yml | 4 +--- rules/missing_punctuation.yml | 5 +++-- rules/test_not_named_test.yml | 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ast-grep-scan.yml b/.github/workflows/ast-grep-scan.yml index 7b1c52383..78a4df843 100644 --- a/.github/workflows/ast-grep-scan.yml +++ b/.github/workflows/ast-grep-scan.yml @@ -30,6 +30,4 @@ jobs: uses: actions/checkout@v4 - name: Ast-grep Scan - uses: ast-grep/action@v1.5 - with: - version: 0.21.4 # Version 0.22.0 breaks the missing_punctuation rule. + uses: ast-grep/action@latest \ No newline at end of file diff --git a/rules/missing_punctuation.yml b/rules/missing_punctuation.yml index 9cffab06a..4fdcf5111 100644 --- a/rules/missing_punctuation.yml +++ b/rules/missing_punctuation.yml @@ -6,9 +6,10 @@ language: Rust rule: kind: line_comment all: - - regex: '.+[^\\.]$' + - not: + regex: '.\.\s*$' - not: regex: '.*https?://.*' precedes: not: - kind: line_comment \ No newline at end of file + kind: line_comment diff --git a/rules/test_not_named_test.yml b/rules/test_not_named_test.yml index cd74326ac..0d11f3b41 100644 --- a/rules/test_not_named_test.yml +++ b/rules/test_not_named_test.yml @@ -2,7 +2,7 @@ id: test_not_named_test message: Test function not named test_. severity: error language: Rust -# Test functions (annotated with #[test] or #[tokio::test]) must be named test_ etc. +# Test functions (annotated with #[test], #[property_test], and #[tokio::test]) must be named test_ etc. rule: kind: function_item not: @@ -11,4 +11,5 @@ rule: kind: attribute_item any: - pattern: '#[test]' + - pattern: '#[property_test]' - pattern: '#[tokio::test]' From 63ede43ed41a99f2febfcad135ee908ab33d1ffd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kejser=20Jensen?= Date: Sat, 22 Aug 2026 13:19:40 +0200 Subject: [PATCH 2/3] Fix ast-grep GitHub Action by specifying a version --- .github/workflows/ast-grep-scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ast-grep-scan.yml b/.github/workflows/ast-grep-scan.yml index 78a4df843..b9ead10be 100644 --- a/.github/workflows/ast-grep-scan.yml +++ b/.github/workflows/ast-grep-scan.yml @@ -30,4 +30,4 @@ jobs: uses: actions/checkout@v4 - name: Ast-grep Scan - uses: ast-grep/action@latest \ No newline at end of file + uses: ast-grep/action@v1.5.0 \ No newline at end of file From c19f9aba9304515ac9def8e439e6c53867e077c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Kejser=20Jensen?= Date: Sun, 23 Aug 2026 11:38:59 +0200 Subject: [PATCH 3/3] Update based on comments from @CGodiksen --- .github/workflows/ast-grep-scan.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ast-grep-scan.yml b/.github/workflows/ast-grep-scan.yml index b9ead10be..203fe6e4b 100644 --- a/.github/workflows/ast-grep-scan.yml +++ b/.github/workflows/ast-grep-scan.yml @@ -30,4 +30,4 @@ jobs: uses: actions/checkout@v4 - name: Ast-grep Scan - uses: ast-grep/action@v1.5.0 \ No newline at end of file + uses: ast-grep/action@v1.5.0 \ No newline at end of file