Skip to content

fix: filter noise from license checks#230

Merged
dmcilvaney merged 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/fix_license
Jun 4, 2026
Merged

fix: filter noise from license checks#230
dmcilvaney merged 1 commit into
microsoft:mainfrom
dmcilvaney:damcilva/fix_license

Conversation

@dmcilvaney
Copy link
Copy Markdown
Contributor

@dmcilvaney dmcilvaney commented Jun 4, 2026

Filter out:

🚀 collectLicenses: Collecting licenses
W0604 10:03:13.741344 3396429 library.go:141] "golang.org/x/sys/unix" contains non-Go code that can't be inspected for further dependencies:
/home/damcilva/go/pkg/mod/golang.org/x/sys@v0.44.0/unix/asm_linux_amd64.s
W0604 10:03:13.741542 3396429 library.go:141] "github.com/klauspost/compress/zstd" contains non-Go code that can't be inspected for further dependencies:
/home/damcilva/go/pkg/mod/github.com/klauspost/compress@v1.18.6/zstd/fse_decoder_amd64.s
/home/damcilva/go/pkg/mod/github.com/klauspost/compress@v1.18.6/zstd/matchlen_amd64.s
/home/damcilva/go/pkg/mod/github.com/klauspost/compress@v1.18.6/zstd/seqdec_amd64.s
W0604 10:03:13.741597 3396429 library.go:141] "github.com/klauspost/compress/huff0" contains non-Go code that can't be inspected for further dependencies:
/home/damcilva/go/pkg/mod/github.com/klauspost/compress@v1.18.6/huff0/decompress_amd64.s
...

Copilot AI review requested due to automatic review settings June 4, 2026 17:14
@dmcilvaney dmcilvaney force-pushed the damcilva/fix_license branch from 37a2319 to e5ab83e Compare June 4, 2026 17:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces noise from go-licenses by filtering out benign “contains non-Go code that can't be inspected” glog warnings (and their continuation path lines), only surfacing remaining output when the license command fails.

Changes:

  • Added reusable filtering/printing helpers in mageutil for suppressing known-benign go-licenses warning blocks.
  • Updated the license check (go-licenses check) to capture combined output and print only filtered output on failure.
  • Updated the license report/save paths to capture stderr, filter benign warnings, and only print remaining stderr output on failure.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
magefiles/mageutil/mageutil.go Adds FilterLicenseNoise and PrintLicenseOutput helpers to remove known-benign go-licenses warning blocks.
magefiles/magecheckfix/checkfix.go Refactors license check/report to capture output and suppress benign warnings unless a command fails.
magefiles/magebuild/magebuild.go Captures go-licenses save stderr to suppress benign warnings unless license collection fails.

Comment thread magefiles/magecheckfix/checkfix.go
@dmcilvaney dmcilvaney merged commit 0256227 into microsoft:main Jun 4, 2026
17 checks passed
@dmcilvaney dmcilvaney deleted the damcilva/fix_license branch June 4, 2026 19:02
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

Successfully merging this pull request may close these issues.

3 participants