Conversation
Yes, on closure is added specifically for the widely available
| @@ -1,50 +1,72 @@ | |||
| { | |||
| generate=[java="8"] | |||
There was a problem hiding this comment.
Something from the distant past, it's 21 java at least now
| val psi = node.psi | ||
| if (psi is BrowserslistSectionImpl) { | ||
| val queriesNumber = psi.sectionQueries?.descendantsOfType<BrowserslistQuery>()?.count() ?: return "..." | ||
| val queriesNumber = psi.queryExpressionList.size |
There was a problem hiding this comment.
I think I was doing [name] ... 2 queries before, now it's
[name]
2 queries
So I don't think ... is required
| return sections.mapNotNull { section -> | ||
| val startOffset = section.queryExpressionList.first().startOffset | ||
| val endOffset = section.queryExpressionList.last().endOffset | ||
| if (endOffset > startOffset) { |
There was a problem hiding this comment.
Shouldn't be a case but given it still may happen if I missed some weird case it's better to be safe
Qodana Community for JVM3 new problems were found
💡 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.1.1
with:
upload-result: trueContact Qodana teamContact us at qodana-support@jetbrains.com
|
I forgot to update the end element
…for kotlin and use the latest working jflex from my luau plugin I tried 1.9.2 and it wasn't working for some weird reasons generating two equal variables in the same class.
Seems that is the reason for class mismatches. I think it should be fine, given it's 5 versions below.
There was a problem hiding this comment.
Pull request overview
This pull request introduces version 2.0.0 of the IntelliJ Browserslist plugin with significant enhancements and a complete parser refactoring. The PR addresses issue #21 and represents a major upgrade requiring Java 21 and IntelliJ Platform 2024.2 or later.
Key Changes:
- Adds missing "not dead" query inspection to prevent support for browsers without security updates
- Implements code vision features showing coverage statistics and links to browsersl.ist
- Adds support for browserslist configuration in package.json files
- Completely refactors the parser with improved error recovery and more flexible syntax handling
Reviewed changes
Copilot reviewed 112 out of 116 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/grammar/Browserslist.bnf | Refactored BNF grammar with expression-based parsing and better error recovery |
| src/main/grammar/Browserslist.flex | Simplified lexer removing many keyword tokens in favor of soft keywords |
| src/main/kotlin/.../inspections/MissingNotDeadInspection.kt | New inspection implementation to detect missing 'not dead' queries |
| src/main/kotlin/.../codevision/* | New code vision providers for coverage statistics |
| src/main/kotlin/.../BrowserslistInjector.kt | Language injection for package.json browserslist sections |
| src/main/kotlin/.../BrowserslistService.kt | Service for executing browserslist CLI and caching results |
| src/test/kotlin/parser/* | Refactored test structure with base classes and recovery tests |
| src/test/kotlin/inspections/* | Comprehensive test coverage for the new inspection |
| build.gradle.kts | Updated to use Gradle 9.x, IntelliJ Platform Gradle Plugin 2.x, and Java 21 |
| gradle.properties | Updated platform version to 2024.2.1 with new dependency structure |
| .github/workflows/* | Modernized CI workflows with updated actions and better disk space management |
Comments suppressed due to low confidence (1)
src/main/gen/com/github/aleksandrsl/intellijbrowserslist/psi/BrowserslistFullSection.java:11
- This method overrides BrowserslistSection.getSectionHeader; it is advisable to add an Override annotation.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes #21