Skip to content

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

@sebastien-rosset

Description

@sebastien-rosset

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions