bamaer opened a new issue, #8875:
URL: https://github.com/apache/hop/issues/8875
### What needs to happen?
Issues found while testing the linter GUI (Rules Manager, Edit Lint Rule,
Show Lint Results and the Problems panel).
### Edit Lint Rule / Add Project Rule
- [ ] **A rule with an empty clause can't be saved, and the error is
cryptic.** The editor only checks the clause that is selected, so a rule with
an empty extra clause is accepted. Saving then fails with:
```
Rule c6736773-ee7d-45ff-b663-c41c415bea37 could not be saved to
hop-lint.yml. The file was not changed.
Cannot invoke "org.apache.hop.lint.RuleCondition.name()" because the
return value of "org.apache.hop.lint.RuleClause.getCondition()" is null
```
`hop-lint.yml` is not changed, but the rule still shows in the Rules
Manager as if it had been added. The editor should check every clause before OK
and say which one is incomplete.
- [ ] **The old value is saved with a condition that takes none.** Switching
from a condition with a value (e.g. Matches Pattern) to one without (e.g. Not
Null) hides the Value field but keeps its content. You can't see or clear it in
the dialog, it is written to `hop-lint.yml`, and it comes back if a condition
with a value is chosen later:
```yaml
NAMING-001:
enabled: false
severity: WARNING
type: custom
target: PIPELINE
targetField: name
condition: NOT_NULL
conditionValue: ^[A-Z][A-Z0-9_]*$
```
The value should be cleared when the condition doesn't use one. Also,
rules without a value are written with an empty `conditionValue: ''`.
- [ ] **Field and Condition are cleared too eagerly, and the clause table no
longer matches.**
- [ ] Changing Target Type (e.g. Pipeline to Workflow) on a rule that
checks `name` clears Field, and Condition with it, even though `name` exists
for both targets.
- [ ] Opening the Field dropdown and choosing the same field again clears
Condition (seen on macOS with Orphaned Transform, `isOrphaned` / Must Be False).
- [ ] In both cases the clause table still shows the old field and
condition, so it no longer matches the dropdowns. OK then fails with "Field
must be selected" or "Condition must be selected" until they're picked again.
- [ ] Field and Condition should stay when they're still valid for the new
target or field, and the table should stay in step with the dropdowns.
- [ ] **Editing a pack rule's name or description silently turns it into a
project rule.** Changing only the name of `DOC-001` writes the whole rule to
`hop-lint.yml` as `type: custom`. It then replaces the pack rule and no longer
picks up changes to `DOC-001` in later Hop versions. That is the documented
behaviour for redefining a rule, but the dialog gives no warning, and a name or
description change is hardly a redefinition. Afterwards Delete Rule is enabled
for that rule, and it restores the pack rule rather than deleting anything.
- [ ] **New project rules get a UUID as their id.** Add Project Rule has no
Rule ID field, so a new rule is saved as e.g.
`a57f1874-0928-4cc1-a600-e5ad1a9ee14f`. That id shows up in findings, SARIF and
`--list-rules`, and you need it to suppress or override the rule. It also makes
the Rule ID column so wide that Severity, Enabled and Tags scroll out of view.
Add an editable Rule ID field that checks for clashes with existing rules.
### Lint Rules Manager
- [ ] **The table can't be sorted.** Clicking a column header does nothing.
Show Lint Results already sorts; this table should do the same (Rule ID,
Source, Target, Severity, Enabled).
### Show Lint Results / Problems panel
- [ ] **"Widget is disposed" errors after closing Show Lint Results.** After
the Show Lint Results window has been opened and closed, every later lint
update logs `Error notifying lint results listener: Widget is disposed` with a
stack trace. That includes Lint Project, excluding a file, switching projects
and editing a file. Each closed window adds one more error per update (2, then
3, then 4 in one session). Nothing breaks, but the log fills up. The listener
should be removed when the window is disposed.
- [ ] **Detach opens on Logging instead of Problems the first time.** Before
a pipeline has run, the docked panel only shows the Problems tab. On Detach,
the floating window also adds Logging, Metrics and Revisions, and it opens on
Logging. Combined with the previous point, you end up on a log full of red
errors and it looks as if something failed. The detached window should open on
the tab that was active.
- [ ] **Minor:** the Severity column in Show Lint Results is too narrow and
cuts `WARNING` to `WARNIN`.
### Issue Priority
Priority: 2
### Issue Component
Component: Hop Gui, Component: Metadata
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]