#87: Making sure the post formatting will only be executed in valid contexts#98
#87: Making sure the post formatting will only be executed in valid contexts#98dorian-krefft-dt merged 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a guard to ensure DQL post-formatting logic only executes in valid DQL file contexts, addressing issue #87.
Changes:
- Added validation to check if the file type is DQL before processing
- Refactored variable declarations in the
processInjectedHostsmethod by moving service instances from parameters to local variables - Reorganized method call order for better logical flow
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| processInjectedHosts(hostFile, range, settings, documentManager, project, dqlSettings); | ||
|
|
||
| // Process only for DQL files or injected fragments | ||
| if (!hostFile.getFileType().equals(DQLFileType.INSTANCE)) { |
There was a problem hiding this comment.
The comment on line 46 states 'Process only for DQL files or injected fragments', but the guard returns early for non-DQL files, which would also skip processing injected DQL fragments in other file types. If injected fragments should still be processed, the validation logic needs to be adjusted to allow processing when DQL is injected into other file types.
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2025.3.1
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
No description provided.