oxsecurity / megalinter

🦙 MegaLinter analyzes 50 languages, 22 formats, 21 tooling formats, excessive copy-pastes, spelling mistakes and security issues in your repository sources with a GitHub Action, other CI tools or locally.
https://megalinter.io
GNU Affero General Public License v3.0
1.81k stars 215 forks source link

Powershell error table formatting issue #3603

Closed TommyE123 closed 3 weeks ago

TommyE123 commented 1 month ago

Describe the bug In release v7.9.0, the output formatting of the PowerShell error table when run in an Azure DevOps pipeline or Github Actions Job is now cut off. The table displaying linting results is not formatted properly, causing misalignment and truncation of information. I believe this issue was introduced by the changes in the following pull request: PR #3318.

Expected behavior The linting results should be displayed in a properly formatted table with aligned columns and no truncation. Additionally, all columns (Severity, RuleName, ScriptName, Line, Message) should be fully visible.

Screenshots V7.8.0 image

V7.11.1 image

Additional context

Thanks

echoix commented 1 month ago

Can you try setting the env variable COLUMNS, and set it a little bit bigger? In the PR linked, the function called from shutils should respect it. It would give a preview of what the output would look like with a wider terminal, but would apply to all linters.