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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ slopgate ships around 140 rules. `slopgate --list-rules` prints the authoritativ
| Core diff checks | `SLP001`–`SLP070` | test quality, code hygiene, safety, API and data smells |
| Go AST checks | `SLP071`–`SLP080` | Go semantic hazards — nil, SQL injection, races, ignored errors |
| Extended checks | `SLP081`–`SLP152` | framework, API, auth, audit, pagination, concurrency, dead-code, and test-completeness patterns |
| Semantic bug checks | `SLP202`, `SLP203`, `SLP204`, `SLP207` | high-signal runtime bugs — nil dereference, DB constraints, swallowed promise failures, missing rollbacks |
| Semantic bug checks | `SLP202`, `SLP203`, `SLP204`, `SLP205`, `SLP207` | high-signal runtime bugs — nil dereference, DB constraints, OpenAPI merge-order overrides, swallowed promise failures, missing rollbacks |

Rules `SLP081` and `SLP033` handle React/TypeScript JSX import behavior for the modern automatic runtime. `SLP081` allows plain JSX without a `React` import, but still flags explicit `React.*` namespace usage unless the file imports `React` through a default or namespace binding. `SLP033` checks import availability using visible diff context and the file snapshot when the import sits outside the changed hunk.

Expand Down
2 changes: 2 additions & 0 deletions pkg/rules/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,8 @@ func Default() *Registry {
r.Register(SLP203{})
// P1: Close Sentry bug gap — silent promise failure mask.
r.Register(SLP204{})
// P1: Close Sentry bug gap — OpenAPI path merge-order override.
r.Register(SLP205{})
// P1: Close Sentry bug gap — transaction missing explicit rollback.
r.Register(SLP207{})
return r
Expand Down
6 changes: 4 additions & 2 deletions pkg/rules/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ func TestDefault_RegistersAllV001Rules(t *testing.T) {
"SLP142": false,
"SLP203": false,
"SLP204": false,
"SLP205": false,
"SLP207": false,
}
for _, rule := range r.All() {
Expand All @@ -152,8 +153,8 @@ func TestDefault_RegistersAllV001Rules(t *testing.T) {
func TestDefault_NoExtraRules(t *testing.T) {
r := Default()

// Includes SLP202, SLP203, SLP204, SLP207 and the P3 rules SLP151, SLP152.
wantCount := 140
// Includes SLP202-SLP205, SLP207 and the P3 rules SLP151, SLP152.
wantCount := 141
if got := len(r.All()); got != wantCount {
t.Errorf("Default registry has %d rules, want %d", got, wantCount)
}
Expand Down Expand Up @@ -183,6 +184,7 @@ func TestDefault_NoExtraRules(t *testing.T) {
"SLP202",
"SLP203",
"SLP204",
"SLP205",
"SLP207",
}
for _, id := range newRules {
Expand Down
Loading
Loading