Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions clients/githubrepo/languages.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func (handler *languagesHandler) init(ctx context.Context, repourl *repoURL) {
handler.once = new(sync.Once)
}

// TODO: Can add support to parse the raw reponse JSON and mark languages that are not in
// TODO: Can add support to parse the raw response JSON and mark languages that are not in
// our defined Language consts in clients/languages.go as "not supported languages".
func (handler *languagesHandler) setup() error {
handler.once.Do(func() {
Expand All @@ -53,7 +53,7 @@ func (handler *languagesHandler) setup() error {
return
}
bodyJSON := map[clients.LanguageName]int{}
// The client.repoClient.Do API writes the reponse body to var bodyJSON,
// The client.repoClient.Do API writes the response body to var bodyJSON,
// so we can ignore the first returned variable (the entire http response object)
// since we only need the response body here.
_, err = client.Do(handler.ctx, req, &bodyJSON)
Expand Down
2 changes: 1 addition & 1 deletion pkg/sarif.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ func (r *ScorecardResult) AsSARIF(showDetails bool, logLevel log.Level,
// We need to create a run entry even if the check is disabled or the policy is satisfied.
// The reason is the following: if a check has findings and is later fixed by a user,
// the absence of run for the check will indicate that the check was *not* run,
// so GitHub would keep the findings in the dahsboard. We don't want that.
// so GitHub would keep the findings in the dashboard. We don't want that.
category, err := computeCategory(sarifCheckName, doc.GetSupportedRepoTypes())
if err != nil {
return sce.WithMessage(sce.ErrScorecardInternal, fmt.Sprintf("computeCategory: %v: %s", err, check.Name))
Expand Down
12 changes: 6 additions & 6 deletions policy/policy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ func TestPolicyRead(t *testing.T) {
result: ScorecardPolicy{
Version: 1,
Policies: map[string]*CheckPolicy{
"Token-Permissions": &CheckPolicy{
"Token-Permissions": {
Score: 3,
Mode: CheckPolicy_DISABLED,
},
"Branch-Protection": &CheckPolicy{
"Branch-Protection": {
Score: 5,
Mode: CheckPolicy_ENFORCED,
},
"Vulnerabilities": &CheckPolicy{
"Vulnerabilities": {
Score: 1,
Mode: CheckPolicy_ENFORCED,
},
Expand All @@ -61,15 +61,15 @@ func TestPolicyRead(t *testing.T) {
result: ScorecardPolicy{
Version: 1,
Policies: map[string]*CheckPolicy{
"Token-Permissions": &CheckPolicy{
"Token-Permissions": {
Score: 0,
Mode: CheckPolicy_DISABLED,
},
"Branch-Protection": &CheckPolicy{
"Branch-Protection": {
Score: 5,
Mode: CheckPolicy_ENFORCED,
},
"Vulnerabilities": &CheckPolicy{
"Vulnerabilities": {
Score: 1,
Mode: CheckPolicy_ENFORCED,
},
Expand Down