Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Spring Data JPA Query Method LinterNew to Visual Studio Code? Get it now.
Spring Data JPA Query Method Linter

Spring Data JPA Query Method Linter

Pham Quoc Bao

| (0) | Free
Real-time validation and diagnostics for Spring Data JPA derived query methods
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Spring Data JPA Query Method Linter

License: MIT Tests: 232 Passing Dependencies Privacy

Instant real-time validation, typo detection, and SQL/JPQL preview for Spring Data JPA derived query methods in VS Code and Cursor.

Catch errors in repository method names as you type, without waiting for Spring Boot application startup or running slow integration tests!


🌟 Key Features

1. ⚡ Real-Time Query Method Linting

  • Instant Typo Detection: Automatically matches query method names against your target @Entity fields.
  • Smart "Did you mean?" Suggestions:
    • Typos in property names: findByRoomIds ➔ suggests roomId
    • Typos in prefixes: findsTopBy... ➔ flags invalid prefix finds
    • Typos in operators: findByAgeGreateThan ➔ suggests GreaterThan
    • Typos in sort order: OrderByYearDesssc ➔ suggests Desc
  • Parameter Count Validation:
    • Warns if method arguments do not match required criteria (e.g., Between requires 2 parameters, IsNull requires 0).
    • Automatically handles Pageable and Sort arguments without false alarms.

2. 🔍 Instant JPQL & SQL Preview on Hover

Hover your mouse over any query method in your repository interface to inspect:

  • The equivalent JPQL / SQL query generated by Spring Data JPA.
  • Action breakdown (Find, Count, Exists, Delete, Limit).
  • Criteria list with bound parameters.
  • Order By clauses.
-- Example Hover Preview for:
-- findTopByRoomIdOrderByBillingYearDescBillingMonthDesc(Long roomId)

JPQL / SQL:
SELECT u
FROM UtilityReading u
WHERE u.roomId = :roomId
ORDER BY u.billingYear DESC, u.billingMonth DESC
LIMIT 1

Action: Find the first UtilityReading record
Criteria:
  • RoomId = :roomId
Order by:
  • BillingYear DESC, BillingMonth DESC

3. 🧭 Deep Multi-Level Entity Traversal

Supports complex nested relationships seamlessly:

  • CamelCase traversal: findByRoomBuildingManagerName(String name)
  • Underscore notation: findByRoom_Building_Manager_Name(String name)
  • Validates every hop in the relationship chain (UtilityReading ➔ Room ➔ Building ➔ Manager ➔ name).

4. 🔒 100% Private, Secure & Lightweight

  • Zero Runtime Dependencies: Ultra-lightweight package (< 30 KB).
  • 100% Offline Execution: Runs entirely in-memory using native VS Code APIs. No cloud servers, no AI tokens, zero telemetry, and 0 network requests.

⚙️ Extension Settings

This extension contributes the following settings:

Setting Type Default Description
springJpaLinter.enable boolean true Enable or disable real-time query method validation.
springJpaLinter.explanationLanguage string "en" Language for hover explanations ("en" for English, "vi" for Vietnamese).

📖 Supported Spring Data JPA Keywords

Category Supported Keywords
Query Verbs find...By, read...By, get...By, query...By, search...By, stream...By
Aggregates & Checks count...By, exists...By, delete...By, remove...By
Limiting Modifiers Distinct, Top<N>, First<N>
Logical Operators And, Or
Comparison Operators Between, LessThan, LessThanEqual, GreaterThan, GreaterThanEqual, After, Before
Equality & Nullability IsNull, IsNotNull, NotNull, True, False
String Matching Like, NotLike, StartingWith, EndingWith, Containing, IgnoreCase, AllIgnoreCase
Collection Operators In, NotIn
Ordering OrderBy<Property>[Asc\|Desc]

🛠️ Testing & Verification

The extension is thoroughly tested with over 230 automated test cases covering valid queries, edge cases, deep entity paths, and multi-clause sorting:

npm test

📄 License

This project is licensed under the MIT License. Copyright (c) 2026 POW-VN.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft