ossf / ossf/scorecard

Optimize the static err definitions

Open
#1,982 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/enhancement Stale
Dominant language
Go
Stars
5.7k
Forks
724
Avg merge
19h 30m
Merged PRs (30d)
1

Description

Is your feature request related to a problem? Please describe.
Static error types defined in scorecard/checks/raw/errors.go or similar places are too scattered.

Solution: Perhaps they could be more generalized. For example, we can simply define something invalid as errInvalid, with a reason string to specify why it's invalid when we throw the error; rather than defining separate errInvalidArgType, errInvalidArgLength, and errInvalidGitHubWorkflow. (proposed by @laurentsimon)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with checks/raw/errors.go and inspect the similar static error definitions mentioned in the issue. Determine how the proposed generalized errors would apply across those locations without changing reported behavior. Done means the scattered definitions are consistently reduced and the existing project checks still pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.