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

[Lint] Change to linter deny list and fix formerly excluded linters #586

Merged
merged 35 commits into from
Aug 1, 2024

Conversation

mpass99
Copy link
Collaborator

@mpass99 mpass99 commented May 7, 2024

No description provided.

@mpass99 mpass99 self-assigned this May 7, 2024
@MrSerth
Copy link
Member

MrSerth commented Jul 1, 2024

From my point of view, this PR is currently on stale, besides the good intent (and our general desire to proceed with this topic). I added it to the project and would suggest to continue it as part of our current maintenance / bug fixing efforts.

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 80.88578% with 82 lines in your changes missing coverage. Please review.

Project coverage is 76.88%. Comparing base (8f819de) to head (84dfd50).
Report is 4 commits behind head on main.

Files Patch % Lines
cmd/poseidon/main.go 55.55% 14 Missing and 2 partials ⚠️
pkg/monitoring/influxdb2_middleware.go 63.15% 7 Missing ⚠️
internal/api/environments.go 62.50% 6 Missing ⚠️
internal/runner/aws_runner.go 53.84% 6 Missing ⚠️
internal/runner/nomad_runner.go 85.36% 5 Missing and 1 partial ⚠️
pkg/nullio/ls2json.go 72.72% 3 Missing and 3 partials ⚠️
internal/api/ws/codeocean_reader.go 66.66% 2 Missing and 3 partials ⚠️
internal/nomad/nomad.go 90.38% 4 Missing and 1 partial ⚠️
internal/api/runners.go 87.09% 4 Missing ⚠️
internal/environment/abstract_manager.go 66.66% 2 Missing and 1 partial ⚠️
... and 12 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #586      +/-   ##
==========================================
- Coverage   76.92%   76.88%   -0.05%     
==========================================
  Files          41       41              
  Lines        3498     3491       -7     
==========================================
- Hits         2691     2684       -7     
- Misses        592      594       +2     
+ Partials      215      213       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mpass99 mpass99 marked this pull request as ready for review July 23, 2024 10:41
@mpass99 mpass99 requested a review from MrSerth July 23, 2024 10:41
MrSerth
MrSerth previously approved these changes Aug 1, 2024
Copy link
Member

@MrSerth MrSerth left a comment

Choose a reason for hiding this comment

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

Many thanks for this tedious work -- I think it is a really huge improvement! 👏

It's also great to see that you were creating so many commits, which made it rather easy for me to review the changes on a commit-by-commit bases. Also, the comments (especially when disabling a linter or on other decisions) were helpful. Overall, I reviewed all commits individually, and learned more about Golang linters during some web searchers 🙂

.golangci.yaml Outdated Show resolved Hide resolved
At some point, the Linter threw errors that were incomprehensible.
because we are currently using dependabot and manual checking of the go.mod file to keep our supply chain secure.
A separate handling via a debguard configuration would at the current point not introduce more security compared to the added complexity.
because it feels wrong that we would have to exhaustively define all switch cases even if a default definition is present.
because it feels wrong to exhaustively initialize structs fields with nil.
because we have too many variables that are almost constants and, thus, this linter is too imprecise.
because we currently have to use the `replace` directive.
because due to lacking understanding of the advantages.
Especially for our storage object, this is exactly required.
as we are used to do differently.
as we use the named returns to further indicate the semantics.
until we address this enhancement with #631.
because for our unit tests we do not follow the black box approach. The black box approach is covered by our e2e tests.
even though it is useful for new projects, we already have established many abbreviations that would cause more work to change that benefits.
because we use newlines for semantic purposes and not only rule-based like this linter.
@MrSerth MrSerth enabled auto-merge (rebase) August 1, 2024 21:12
@MrSerth MrSerth merged commit 88bbb51 into main Aug 1, 2024
10 checks passed
@MrSerth MrSerth deleted the fix/golangci-lint branch August 1, 2024 21:18
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.

2 participants