You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Github Comment Reporter doesn't render a summary markdown table as a PR comment if only one linter is enabled.
To Reproduce
Steps to reproduce the behavior:
Enable only one linter in the config file (for me it was RUBY_RUBOCOP but the actual linter doesn't matter)
Perform Megalinter run in Github Actions (flavor image doesn't matter) for a PR, so it finishes and prints the summary table in the console via Console Reporter. Notice the comment: [GitHub Comment Reporter] Posted summary as a comment on company/project #PR1
Navigate to the PR and see missing table in PR comment, despite the table exists in the console
Expected behavior
Github Comment Reporter should render the summary table for any number of enabled linters and any execution status.
Screenshots
Additional context
After investigating and debugging the current main branch, I found how the table should be generated. However the next line
apparently has unexpected behavior in else case. If one linter is enabled, it overwrites the whole table content with empty string and thus we have the missing table. I tried to wrap os.linesep + if-else block in parentheses or even remove it - in both cases, it began to work as expected.
The text was updated successfully, but these errors were encountered:
Describe the bug
Github Comment Reporter doesn't render a summary markdown table as a PR comment if only one linter is enabled.
To Reproduce
Steps to reproduce the behavior:
[GitHub Comment Reporter] Posted summary as a comment on company/project #PR1
Expected behavior
Github Comment Reporter should render the summary table for any number of enabled linters and any execution status.
Screenshots
Additional context
After investigating and debugging the current
main
branch, I found how the table should be generated. However the next linemegalinter/megalinter/utils_reporter.py
Line 71 in 21e87f7
else
case. If one linter is enabled, it overwrites the whole table content with empty string and thus we have the missing table. I tried to wrapos.linesep + if-else
block in parentheses or even remove it - in both cases, it began to work as expected.The text was updated successfully, but these errors were encountered: