diff --git a/.config/checkstyle/checkstyle.xml b/.config/checkstyle/checkstyle.xml index ca79b25..f7414c4 100644 --- a/.config/checkstyle/checkstyle.xml +++ b/.config/checkstyle/checkstyle.xml @@ -85,6 +85,7 @@ + diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 5b50d06..7b1481c 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -3,7 +3,7 @@ name: Broken links on: workflow_dispatch: schedule: - - cron: "23 23 * * 0" + - cron: "23 5 * * 0" permissions: issues: write @@ -21,6 +21,7 @@ jobs: id: lychee uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2 with: + args: "--verbose --no-progress './**/*.md'" fail: false # Don't fail on broken links, create an issue instead - name: Find already existing issue diff --git a/.idea/checkstyle-idea.xml b/.idea/checkstyle-idea.xml index a751c41..27f72ce 100644 --- a/.idea/checkstyle-idea.xml +++ b/.idea/checkstyle-idea.xml @@ -1,7 +1,7 @@ - 13.0.0 + 13.4.0 JavaOnlyWithTests true true diff --git a/CHANGELOG.md b/CHANGELOG.md index ebc89c5..dc9a37c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 1.1.0 +* Update PMD to 7.24.0 +* Dropped support for IntelliJ IDEA < 261 to fix deprecations + # 1.0.8 * Correctly handle missing/removal of built-in configuration * Fix crash on non Java-IDEs #67 diff --git a/build.gradle b/build.gradle index 7a3d868..529c27b 100644 --- a/build.gradle +++ b/build.gradle @@ -3,13 +3,13 @@ plugins { id 'idea' id 'checkstyle' id 'pmd' - id 'org.jetbrains.intellij.platform' version '2.13.1' + id 'org.jetbrains.intellij.platform' version '2.15.0' } ext { - checkstyleVersion = '13.4.0' + checkstyleVersion = '13.4.1' - pmdVersion = '7.23.0' + pmdVersion = '7.24.0' } def properties(String key) { @@ -104,14 +104,9 @@ intellijPlatform { } pluginVerification { ides { - select { - it.types = [IntelliJPlatformType.IntellijIdeaCommunity] - it.sinceBuild = properties("platformSinceBuild") - it.untilBuild = '252.*' - } select { it.types = [IntelliJPlatformType.IntellijIdea] - it.sinceBuild = '253' + it.sinceBuild = properties("platformSinceBuild") } } } diff --git a/gradle.properties b/gradle.properties index 1446d40..353f3b1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,11 +2,11 @@ pluginGroup=software.xdev.pmd pluginName=PMD X # SemVer format -> https://semver.org -pluginVersion=1.0.9-SNAPSHOT +pluginVersion=1.1.0-SNAPSHOT # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension platformType=IU -platformVersion=2025.3.1.1 -platformSinceBuild=243 +platformVersion=2026.1.1 +platformSinceBuild=261 # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformBundledPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 platformBundledPlugins=com.intellij.java,org.jetbrains.kotlin diff --git a/renovate.json5 b/renovate.json5 index fa392df..5903655 100644 --- a/renovate.json5 +++ b/renovate.json5 @@ -12,6 +12,14 @@ ], "matchCurrentVersion": "0", "enabled": false + }, + { + "description": "org.jetbrains.intellij.platform - Changelog", + "packagePattern": "^org.jetbrains.intellij.platform", + "matchDatasources": [ + "maven" + ], + "changelogUrl": "https://github.com/JetBrains/intellij-platform-gradle-plugin/releases" } ] } diff --git a/src/main/java/software/xdev/pmd/action/ActionFilesAnalyzer.java b/src/main/java/software/xdev/pmd/action/ActionFilesAnalyzer.java index 4b51517..fc63c54 100644 --- a/src/main/java/software/xdev/pmd/action/ActionFilesAnalyzer.java +++ b/src/main/java/software/xdev/pmd/action/ActionFilesAnalyzer.java @@ -85,8 +85,13 @@ private void analyzeAsync( project.getService(PluginConfigurationManager.class).getCurrent(); final ProjectFileIndex projectFileIndex = ProjectRootManager.getInstance(project).getFileIndex(); - final Map, Set> psiFiles = ReadAction.compute(() -> - this.collectFiles(projectFileIndex, psiManager, pluginConfiguration, progressIndicator, selectedFiles)); + final Map, Set> psiFiles = + ReadAction.computeBlocking(() -> this.collectFiles( + projectFileIndex, + psiManager, + pluginConfiguration, + progressIndicator, + selectedFiles)); if(psiFiles.isEmpty()) { diff --git a/src/main/java/software/xdev/pmd/analysis/PMDAnalyzer.java b/src/main/java/software/xdev/pmd/analysis/PMDAnalyzer.java index 59bc242..01a9574 100644 --- a/src/main/java/software/xdev/pmd/analysis/PMDAnalyzer.java +++ b/src/main/java/software/xdev/pmd/analysis/PMDAnalyzer.java @@ -268,7 +268,7 @@ private List determineApplicableFiles( final int totalFiles = filesToScan.size(); final AtomicInteger counter = new AtomicInteger(0); - final List files = ReadAction.compute(() -> filesToScan.stream() + final List files = ReadAction.computeBlocking(() -> filesToScan.stream() .filter(file -> { progressIndicator.setFraction((double)counter.incrementAndGet() / totalFiles); progressIndicator.setText2(file != null ? file.getName() : null); diff --git a/src/main/java/software/xdev/pmd/annotator/PMDExternalLanguageAnnotator.java b/src/main/java/software/xdev/pmd/annotator/PMDExternalLanguageAnnotator.java index ddd594a..947dfff 100644 --- a/src/main/java/software/xdev/pmd/annotator/PMDExternalLanguageAnnotator.java +++ b/src/main/java/software/xdev/pmd/annotator/PMDExternalLanguageAnnotator.java @@ -178,8 +178,7 @@ public void apply( + "

" + ruleDescriptionDocMarkdownToHtmlService.mdToHtml(rule.getDescription()) + "

") - .range(range) - .needsUpdateOnTyping(true); + .range(range); if(psiElement != null) { diff --git a/src/main/java/software/xdev/pmd/currentfile/CurrentFileAnalysisManager.java b/src/main/java/software/xdev/pmd/currentfile/CurrentFileAnalysisManager.java index 57b7f6f..b06ccc0 100644 --- a/src/main/java/software/xdev/pmd/currentfile/CurrentFileAnalysisManager.java +++ b/src/main/java/software/xdev/pmd/currentfile/CurrentFileAnalysisManager.java @@ -77,7 +77,7 @@ private void reportAnalysisResultInternal( return; } - final Optional optPSIFile = ReadAction.compute(() -> Optional.of(editor) + final Optional optPSIFile = ReadAction.computeBlocking(() -> Optional.of(editor) .map(Editor::getDocument) .map(FileDocumentManager.getInstance()::getFile) .flatMap(this::findPSIFile)); diff --git a/src/main/java/software/xdev/pmd/ui/toolwindow/node/FileOverviewNode.java b/src/main/java/software/xdev/pmd/ui/toolwindow/node/FileOverviewNode.java index 8aad795..f3a26f9 100644 --- a/src/main/java/software/xdev/pmd/ui/toolwindow/node/FileOverviewNode.java +++ b/src/main/java/software/xdev/pmd/ui/toolwindow/node/FileOverviewNode.java @@ -29,7 +29,7 @@ public FileOverviewNode(final PsiFile psiFile) { this.psiFile = psiFile; // Icon requires read access so let's get it here - this.icon = ReadAction.compute(() -> psiFile.getIcon(0)); + this.icon = ReadAction.computeBlocking(() -> psiFile.getIcon(0)); this.filePositionSupplier = Suppliers.memoize(() -> new FilePosition(psiFile)); }