You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hop.apache.org by "mattcasters (via GitHub)" <gi...@apache.org> on 2026/09/26 17:41:10 UTC

[PR] Issue #8521 : Honor a disabled linter and file or script action sources (hop)

mattcasters opened a new pull request, #8635:
URL: https://github.com/apache/hop/pull/8635

   Switching the linter off left the Explorer mark on a file that already had findings, and opening or editing a file still linted it. The canvas badges already followed the option. The Explorer paints a file when the tree item is created, so a later redraw never cleared the color.
   
   SQL, Shell and Set Variables also checked the source the action was not using:
   
   - SQL always looked up a property named `SQL`, so a statement read from a file was reported as blank.
   - Shell always required a filename, including when Insert script runs the text on the Script tab.
   - Set Variables looked up `variableName`, which is not a field on the action, so a properties file failed with "Unable to validate."
   
   A file or a typed script is enough for SQL and Shell. A properties file or a variable list is enough for Set Variables. The check fails only when neither source is set.
   
   fixes #8521
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   - [ ] Run `mvn clean install apache-rat:check` to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
   - [x] If you have a group of commits related to the same change, please squash your commits into one and force push your branch using `git rebase -i`.
   - [x] Mention the appropriate issue in your description (for example: `addresses #123`), if applicable.
   
   To make clear that you license your contribution under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
   - [x] I hereby declare this contribution to be licensed under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Issue #8521 : Honor a disabled linter and file or script action sources (hop)

Posted by "bamaer (via GitHub)" <gi...@apache.org>.
bamaer merged PR #8635:
URL: https://github.com/apache/hop/pull/8635


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Issue #8521 : Honor a disabled linter and file or script action sources (hop)

Posted by "bamaer (via GitHub)" <gi...@apache.org>.
bamaer commented on PR #8635:
URL: https://github.com/apache/hop/pull/8635#issuecomment-5854639410

   The three `check()` fixes are right and the tests pin the behaviour that matters. Two gaps in the linter part; both are follow-up-able, so this can go in as-is, but it's cleaner with them.
   
   **An in-flight pass still publishes after the switch goes off.** The guards are all at the scheduling boundary, none at the publish. `lintProjectAsync` (`BackgroundLintService.java:169`) calls `updateResultsForFile` per file in a loop that runs a while on a big project, and `lintFileInternal` (`:336`) doesn't check at all. Switch the linter off mid-pass and those findings land after `applyEnabledState()` has called `clearResults()`. The Explorer and the canvas are covered by their own guards, but `PipelineProblemsTabSync.refreshForFile` reads the manager unguarded, so the Problems tab shows lint findings with the linter off until the option is toggled again. One choke point covers every producer:
   
   ```java
   public synchronized void updateResultsForFile(String filePath, List<LintResult> results) {
     if (!LinterConfigPlugin.getInstance().isLinterEnabled()) {
       return;
     }
   ```
   
   **Re-enabling doesn't restore the Problems bar on editors opened while off.** `attachToGraph` only runs from `EditorLintSupport.onNewGraph`, which now returns early when disabled. `applyEnabledState()` re-lints, so the canvas totals come back, but `refreshAllOpenEditors()` walks `filePathByGraphId` — never populated for those graphs — and `refreshForFile` is deliberately passive. The bar returns only once the user edits the file. Attaching the open graphs on the enable path fixes it, walking them the way `LintEditorGraphHelper.findAmongOpenEditors` already does:
   
   ```java
   for (TabItemHandler item : HopGui.getExplorerPerspective().getItems()) {
     if (item.getTypeHandler() instanceof HopGuiAbstractGraph graph && !graph.isDisposed()) {
       EditorLintSupport.onNewGraph(graph);
     }
   }
   ```
   


-- 
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: issues-unsubscribe@hop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org