Skip to content

Commit 83e7bde

Browse files
Add validation to fileinfo plugin input pattern
CMK-12283 Change-Id: Icae251a5110fb52eb07f571dcb9b45a125993a6a
1 parent c021455 commit 83e7bde

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.werks/18352.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[//]: # (werk v2)
2+
# fileinfo: Validate file group patterns to prevent configuration errors
3+
4+
key | value
5+
---------- | ---
6+
date | 2025-07-22T13:39:35+00:00
7+
version | 2.5.0b1
8+
class | fix
9+
edition | cee
10+
component | checks
11+
level | 1
12+
compatible | no
13+
14+
### Problem
15+
Previously, invalid regular expressions in file group patterns (in the fileinfo check) could be saved without warning.
16+
This could lead to runtime errors.
17+
18+
### Fix
19+
Patterns are now validated when editing the rule.
20+
Only valid regular expressions can be saved.
21+
22+
### Impact
23+
If your existing configuration contains invalid patterns, you will see an error message like:
24+
```
25+
The pattern <pattern> is not a valid regular expression: <error message>
26+
```
27+
28+
You can either:
29+
30+
- Fix the broken patterns immediately as prompted, or
31+
- Skip fixing and proceed with the update — your configuration will still work as before, but
32+
editing those rules later will cause invalid patterns to be lost (the rule will be emptied).
33+
34+
### Action Required
35+
Review and correct any problematic patterns before applying changes to the configuration.

0 commit comments

Comments
 (0)