Skip to content
This repository was archived by the owner on Aug 16, 2025. It is now read-only.

Commit 0ae7df9

Browse files
committed
Fixes:
- fixed an issue with file * wildcard Rules: - added JetBrains java error logs - better naming and description for JetBrains Java error heap dump
1 parent 3a971f4 commit 0ae7df9

2 files changed

Lines changed: 24 additions & 3 deletions

File tree

cleanup-list.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
{
2-
"jetbrains_java_error": {
2+
"jetbrains_java_error_heap_dump": {
33
"application": "JetBrains",
44
"category": "IDE",
55
"entity_category": "crash log",
6-
"description": "Java error log of JetBrains tools. Can be several gigabytes.",
6+
"description": "Java error heap dump of JetBrains tools. Can be several gigabytes.",
77
"delete" : {
88
"type": "file",
99
"location": "~/java_error_in_*.hprof"
1010
},
1111
"active": true
1212
},
13+
"jetbrains_java_error_logs": {
14+
"application": "JetBrains",
15+
"category": "IDE",
16+
"entity_category": "crash log",
17+
"description": "Java error logs for various JetBrains tools.",
18+
"delete": {
19+
"type": "file",
20+
"location": "~/java_error_in_*.log"
21+
},
22+
"active": true
23+
},
1324
"gradio_temporary_files": {
1425
"application": "Gradio",
1526
"category": "AI",

src/get-entities.ps1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,17 @@ function Get-Entities {
3434
switch ($_.Value.delete.type)
3535
{
3636
"file" {
37-
if (Test-Path -Path $location -PathType Leaf) {
37+
if ($location -like '*[*]*') {
38+
$matchingFiles = Get-ChildItem -Path $location -File
39+
foreach ($file in $matchingFiles) {
40+
$fileItem = @{}
41+
$fileItem.location = $file.FullName
42+
$fileItem.size = $file.Length
43+
$fileItem.rule = $name
44+
$files.Add($fileItem)
45+
$sizeCounter += $fileItem.size
46+
}
47+
} elseif (Test-Path -Path $location -PathType Leaf) {
3848
$fileItem = @{}
3949
$fileItem.location = $location
4050
$file = Get-Item $location

0 commit comments

Comments
 (0)