Skip to content

Add linters#684

Merged
rajathagasthya merged 6 commits intomainfrom
linters
Mar 7, 2025
Merged

Add linters#684
rajathagasthya merged 6 commits intomainfrom
linters

Conversation

@rajathagasthya
Copy link

@rajathagasthya rajathagasthya commented Mar 3, 2025

Adds exceptions in some cases.

Linters not enabled need to be fixed at a later time after examining changes.

Adds exceptions in some cases.
@rajathagasthya rajathagasthya changed the title Add gosec and govet linters Add linters Mar 3, 2025
@rajathagasthya rajathagasthya marked this pull request as ready for review March 3, 2025 23:32
@rajathagasthya rajathagasthya requested a review from aramprice March 3, 2025 23:32
@rkoster rkoster requested review from a team and klakin-pivotal and removed request for a team March 6, 2025 16:10
@rkoster rkoster moved this from Inbox to Pending Review | Discussion in Foundational Infrastructure Working Group Mar 6, 2025
@github-project-automation github-project-automation bot moved this from Pending Review | Discussion to Pending Merge | Prioritized in Foundational Infrastructure Working Group Mar 6, 2025
Copy link
Member

@selzoc selzoc left a comment

Choose a reason for hiding this comment

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

LGTM, some questions just about the results of the linters.


func (r *cmdRunner) RunStreamingCommand(out io.Writer, env map[string]string, args ...string) (string, string, int, error) {
exports := make([]string, len(env))
var exports []string
Copy link
Member

Choose a reason for hiding this comment

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

What's wrong with makeing a slice if you know the length beforehand?

Copy link
Author

Choose a reason for hiding this comment

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

Nothing wrong, but you'd want to index the slice to add items instead of append like below. append is going to grow the slice and then you have len(env) zero-values at the beginning of the slice.

@rajathagasthya rajathagasthya merged commit b65437e into main Mar 7, 2025
9 checks passed
@github-project-automation github-project-automation bot moved this from Pending Merge | Prioritized to Done in Foundational Infrastructure Working Group Mar 7, 2025
@rajathagasthya rajathagasthya deleted the linters branch March 7, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

4 participants