feat: enhance golangci-lint configuration for better code quality#367
feat: enhance golangci-lint configuration for better code quality#367rishi-jat wants to merge 8 commits intollm-d:mainfrom
Conversation
elevran
left a comment
There was a problem hiding this comment.
@rishi-jat thanks for the PR.
A few points that are required in order to start moving it forward:
- DCO is required
- rebasing is required
- while helpful for PR review, the markdown files are not part of the configuration change and should not be included in the PR.
- CI should pass (currently fails)
- lint configuration file is missing a newline at end of file.
In addition, we'll review the list of added/modified linters` configuration so can reach consensus on specific linters ROI (e.g., false positive rates...)
f32c095 to
33cbde7
Compare
|
@rishi-jat please address previous review comments (DCO, remove extra files in commit). |
|
Apologies, For late will do all the suggested changes today! Thanks |
fffc431 to
8c41d39
Compare
|
thanks for removing the extra files. |
- Add 10+ new high-value linters focusing on security, k8s patterns, and code quality - Enhanced error handling with errorlint, nilerr for robust controller code - Added security linters: gosec, bodyclose, contextcheck, noctx - Improved import organization with gci for large project maintainability - Added character safety checks: asciicheck, bidichk - Enhanced testing support with testpackage for Ginkgo conventions - Strategically disabled overly restrictive linters (varnamelen, exhaustruct, etc.) - Maintains compatibility with existing codebase while improving standards Fixes llm-d#149 Signed-off-by: Rishi Jat <rishijat098@gmail.com>
8c41d39 to
0b021fc
Compare
|
@elevran I have fix the lint error and also can you please add Hacktoberfestt tag as this pr is part of my Hacktoberfest contribution! |
|
what is an |
| @@ -1,33 +1,80 @@ | |||
| version: "2" | |||
There was a problem hiding this comment.
@rishi-jat "version: 2" is required and must be explicitly set (version 1 uses a different file format - see lint action failure on the PR).
Please restore this line
There was a problem hiding this comment.
@rishi-jat the latest commit is still missing the "version: 2" line and fails passing the required lint test.
Please fix and run make lint locally on your branch and ensure passing before resubmitting for review.
/hold
|
This PR is marked as stale after 21d of inactivity. After an additional 14d of inactivity, it will be closed. To prevent this PR from being closed, add a comment or remove the |
* Make sure that max_completion_tokens=1 in Prefill Signed-off-by: Shmuel Kallner <kallner@il.ibm.com> * Remove/undo setting of max_completion_tokens to 1, for decode Signed-off-by: Shmuel Kallner <kallner@il.ibm.com> --------- Signed-off-by: Shmuel Kallner <kallner@il.ibm.com>
* elaborate relation to IGW/GIE Signed-off-by: Etai Lev Ran <elevran@gmail.com> * coalesce sections on relation to GIE Signed-off-by: Etai Lev Ran <elevran@gmail.com> --------- Signed-off-by: Etai Lev Ran <elevran@gmail.com>
- Remove deprecated gomnd linter - Add newline at end of file - Add exclusion rules for problematic packages - Configuration now works with modern golangci-lint versions Fixes golangci-lint compatibility and CI issues. Signed-off-by: Rishi Jat <rishijat098@gmail.com>
- Add required 'version: 2' field as requested in review - Move goimports and gofmt from linters to formatters section - Fix configuration structure to match golangci-lint v2 format - Maintain all original and new linters from previous enhancement Addresses feedback from maintainer review in llm-d#367 Signed-off-by: Rishi Jat <rishijat098@gmail.com>
- Remove version field temporarily to test with current CI setup - Fix incorrect version v2.1.6 in CI workflow - Use golangci-lint-action@v8 default version Signed-off-by: Rishi Jat <rishijat098@gmail.com>
2a03593 to
fa6854a
Compare
Signed-off-by: Rishi Jat <rishijat098@gmail.com>
|
@elevran PTAL |
| - name: Run lint checks | ||
| uses: golangci/golangci-lint-action@v9 | ||
| with: | ||
| version: 'v2.1.6' |
There was a problem hiding this comment.
what is the rationale for removing the specific version? will it run with some latest v2?
There was a problem hiding this comment.
should this change be part of this PR?
Does not seem lint related. Can you please remove it from the PR?
|
The PR had been open for quite a while. The issue itself was simple, but I unintentionally made it more complex earlier and couldn’t give it proper attention due to commitments elsewhere. I’ve now opened a clean PR that fixes the issue correctly, and it’s ready for review and merge. Sorry for the delay, and thank you for the patience. |
|
@rishi-jat thank you for following up with #495 as replacement! |

Fixes #149