Skip to content

Conversation

@StrikerRUS
Copy link
Collaborator

Current master lint CI run was successful even after the following error:

...
Linting PowerShell code
Invoke-ScriptAnalyzer: /home/runner/work/LightGBM/LightGBM/.ci/lint-powershell.ps1:56
Line |
  56 |  Invoke-ScriptAnalyzer -Path ./ -Recurse -EnableExit -Settings $settin …
     |  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     | Object reference not set to an instance of an object.
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
...

https://github.com/microsoft/LightGBM/actions/runs/20750440389/job/59578148561#step:3:536


How I tested?

Make an error in argument name: -Recurse -> -Reurse and run CI.

Without the proposed fix CI is green:

...
Linting PowerShell code
Invoke-ScriptAnalyzer: /home/runner/work/LightGBM/LightGBM/.ci/lint-powershell.ps1:58
Line |
  58 |  Invoke-ScriptAnalyzer -Path ./ -Reurse -EnableExit -Settings $setting …
     |                                 ~~~~~~~
     | A parameter cannot be found that matches parameter name 'Reurse'.
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... done
...

https://github.com/microsoft/LightGBM/actions/runs/21009530986/job/60400683817#step:3:534

With the proposed fix CI is red:

...
Linting PowerShell code
Invoke-ScriptAnalyzer: /home/runner/work/LightGBM/LightGBM/.ci/lint-powershell.ps1:58
Line |
  58 |  Invoke-ScriptAnalyzer -Path ./ -Reurse -EnableExit -Settings $setting …
     |                                 ~~~~~~~
     | A parameter cannot be found that matches parameter name 'Reurse'.
Error: Process completed with exit code 1.

https://github.com/microsoft/LightGBM/actions/runs/21009804641/job/60401641039#step:3:533

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh wow, thank you for noticing and fixing this!

@jameslamb
Copy link
Collaborator

Looks like the failing latest versions job was caused by this recent scikit-learn PR: scikit-learn/scikit-learn#32212

I've put up #7128 with a proposed fix.

@StrikerRUS
Copy link
Collaborator Author

Thank you so much!

@StrikerRUS StrikerRUS merged commit 648bf89 into master Jan 19, 2026
104 of 106 checks passed
@StrikerRUS StrikerRUS deleted the ci/fix-ps-linting branch January 19, 2026 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants