Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .github/workflows/ast-grep-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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@v1.5.0
5 changes: 3 additions & 2 deletions rules/missing_punctuation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ language: Rust
rule:
kind: line_comment
all:
- regex: '.+[^\\.]$'
- not:
regex: '.\.\s*$'
- not:
regex: '.*https?://.*'
precedes:
not:
kind: line_comment
kind: line_comment
3 changes: 2 additions & 1 deletion rules/test_not_named_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -11,4 +11,5 @@ rule:
kind: attribute_item
any:
- pattern: '#[test]'
- pattern: '#[property_test]'
- pattern: '#[tokio::test]'
Loading