question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub Annotations suppresses normal output

See original GitHub issue

Welcome

  • Yes, I’m using a binary release within 2 latest major releases. Only such installations are supported.
  • Yes, I’ve searched similar issues on GitHub and didn’t find any.
  • Yes, I’ve included all information below (version, config, etc).
  • Yes, I’ve tried with the standalone linter if available. (https://golangci-lint.run/usage/linters/)

Description of the problem

I really love that the github action supports annotations. But when using it, there is minimal other output. Specifically, while the message is printed, it lacks the file/line number. (And at least sometimes, Github itself doesn’t display anything at all)

Everything is in the annotations, but those don’t display properly in a couple of cases:

  1. Newly added linters may find things outside the PR. Those annotations are not displayed anywhere. (There’s a note that they happened, but no link to a file and line number
  2. If there are a lot of failures, having a clear list would be helpful

I’m not sure if this is a bug or a feature request…

I’d suggest either a normal print along side the github actions print, or allowing multiple out-formats to be specified.

Version of golangci-lint

github actions
      - uses: actions/checkout@v2
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2
        with:
          version: v1.42

Configuration file

N/A

Go environment

GitHub Actions

Verbose output of running

No Output:

No Output

Minimal Output:

Minimal Output

None of those include file/line number

Code example or link to a public repository

https://github.com/kolide/launcher/runs/4039960409?check_suite_focus=true

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ldezcommented, Apr 22, 2022

In golangci-lint it’s now possible to have multiple output formats. Maybe it requires some changes inside the GitHub Action.

0reactions
zfy0701commented, Aug 10, 2022

the problem of running lint twice makes the github page show error twice as well, e.g. image

but it still much better than no output. in some cases, not just line number but the detail error message will be eaten

Read more comments on GitHub >

github_iconTop Results From Across the Web

git-blame Documentation - Git
Annotates each line in the given file with information from the revision which last modified the line. Optionally, start annotating from the given...
Read more >
Finding duplicated code with CPD | PMD Source Code Analyzer
Java allows to toggle suppression by adding the annotations ; @SuppressWarnings("CPD-START") and ; @SuppressWarnings("CPD-END") all code within will be ignored by ...
Read more >
Code annotation attributes | ReSharper Documentation
Annotations framework provides a number of attributes described below. ... the method output means that the method doesn't return normally ...
Read more >
Suppressing and Skipping Policies - checkov
Edit on GitHub ... Like any static-analysis tool, suppression is limited by its analysis scope. ... The output now contains a SKIPPED check...
Read more >
Announcing third-party code scanning tools: static analysis ...
The results are formatted as SARIF and uploaded to the GitHub ... per tool and GitHub is able to track and suppress duplicate...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found