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

✨ announce where results are written #4132

Merged
merged 3 commits into from
Jun 6, 2024

Conversation

raboof
Copy link
Contributor

@raboof raboof commented May 29, 2024

What kind of change does this PR introduce?

Minor usability improvement

What is the current behavior?

When running with '-o foo' the output would end with:

RESULTS
-------

What is the new behavior (if this is a feature change)?**

This was rather confusing. There's of course many ways to make this more clear, this commit adds a log line announcing where the output is written to:

RESULTS
-------
Writing to foo
  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

@raboof raboof requested a review from a team as a code owner May 29, 2024 13:18
@raboof raboof requested review from justaugustus and raghavkaul and removed request for a team May 29, 2024 13:18
@raboof raboof temporarily deployed to integration-test May 29, 2024 13:18 — with GitHub Actions Inactive
Before this change, when running with '-o foo' the output would end
with:

```
RESULTS
-------
```

This was rather confusing. There's of course many ways to make this more
clear, this commit adds a log line announcing where the output is
written to:

```
RESULTS
-------
Writing to foo
```

Signed-off-by: Arnout Engelen <arnout@bzzt.net>
@raboof raboof changed the title 👻 announce where results are written ✨ announce where results are written May 29, 2024
@raboof raboof temporarily deployed to integration-test May 29, 2024 13:26 — with GitHub Actions Inactive
Copy link
Contributor

@raghavkaul raghavkaul left a comment

Choose a reason for hiding this comment

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

Thanks!

I believe there is a lint that is supposed to prevent new print statements, not sure why it isn't complaining here...

@spencerschrock spencerschrock merged commit 3da6db5 into ossf:main Jun 6, 2024
36 checks passed
@spencerschrock
Copy link
Contributor

I believe there is a lint that is supposed to prevent new print statements, not sure why it isn't complaining here...

The linter was added primarily from people writing to stdout, so it's not currently configured for fmt.Fprintf which often redirects to a different io.Writer

scorecard/.golangci.yml

Lines 93 to 96 in 3da6db5

forbidigo:
forbid:
- p: "^fmt\\.Print.*$"
msg: "Do not commit print statements. Output to stdout interferes with users who redirect JSON results to files."

balteravishay pushed a commit to balteravishay/scorecard that referenced this pull request Jun 12, 2024
Before this change, when running with '-o foo' the output would end
with:

```
RESULTS
-------
```

This was rather confusing. There's of course many ways to make this more
clear, this commit adds a log line announcing where the output is
written to:

```
RESULTS
-------
Writing to foo
```

Signed-off-by: Arnout Engelen <arnout@bzzt.net>
Signed-off-by: balteraivshay <avishay.balter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants