Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

By default, warnings written to github action job without file name and line number #4

Open
sebastien-rosset opened this issue Nov 7, 2022 · 0 comments

Comments

@sebastien-rosset
Copy link

sebastien-rosset commented Nov 7, 2022

By default, when woke runs as a github action, the warnings are written in the job logs without file name and line numbers. This makes it harder to identify the specific location of the problem. For example, the output below shows there are 5 problems, but it's not clear where the problems are.

2022-11-07T13:40:26.9324284Z ##[endgroup]
2022-11-07T13:40:26.9325398Z ##[group] Running woke ...
2022-11-07T13:40:26.9788760Z ##[warning]`whitelist` may be insensitive, use `allowlist`, `inclusion list` instead
2022-11-07T13:40:26.9801507Z ##[warning]`whitelist` may be insensitive, use `allowlist`, `inclusion list` instead
2022-11-07T13:40:26.9804777Z ##[warning]`whitelist` may be insensitive, use `allowlist`, `inclusion list` instead
2022-11-07T13:40:26.9808260Z ##[warning]`whitelist` may be insensitive, use `allowlist`, `inclusion list` instead
2022-11-07T13:40:26.9811147Z ##[warning]`whitelist` may be insensitive, use `allowlist`, `inclusion list` instead
2022-11-07T13:40:27.0026287Z Error: files with findings: 1

There are two workarounds, but would it be possible to show the file and line number by default?

  1. Add -o option as output argument in the github action configuration.
  2. Use the GitHub UI to view the woke warnings in context. I.e. are displayed in context with file and line number.

For example, if the woke-args is set to -o text, it's easier to identity the problem because the file paths and line numbers are displayed:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant