Skip to content

chore(linter): fix linter issue in api and cmd package#5413

Merged
Skarlso merged 13 commits intoexternal-secrets:mainfrom
Lumexralph:olumide/configure-revive-linter-apis
Oct 24, 2025
Merged

chore(linter): fix linter issue in api and cmd package#5413
Skarlso merged 13 commits intoexternal-secrets:mainfrom
Lumexralph:olumide/configure-revive-linter-apis

Conversation

@Lumexralph
Copy link
Copy Markdown
Contributor

Problem Statement

According to this PR #3396 was implemented, the revive linter wasn't configured because it had loads of issues to be fixed. This PR configures the revive linter and fixes all the issues raised by the linter.

Related Issue

Fixes #3397

Proposed Changes

Fix all the issues raised by the linter so that we can configure the revive linter. It focuses on fixes the lint issues in the apis and cmd package.

Format

Please ensure that your PR follows the following format for the title:

feat(scope): add new feature
fix(scope): fix bug
docs(scope): update documentation
chore(scope): update build tool or dependencies
ref(scope): refactor code
clean(scope): provider cleanup
test(scope): add tests
perf(scope): improve performance
desig(scope): improve design

Where scope is optionally one of:

  • charts
  • release
  • testing
  • security
  • templating

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • I ensured my PR is ready for review with make reviewable

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
@github-actions github-actions bot added area/linter kind/chore Categorizes Pull Requests for chore activities (like bumping versions) size/l labels Oct 5, 2025
@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 8, 2025

@Lumexralph Ugh, do you know why there might be so much duplication all of a sudden?

@moolen
Copy link
Copy Markdown
Member

moolen commented Oct 8, 2025

don't think that duplication means a lot in this context. It complains about comments being duplicated. Sentences in comments follow a similar structure, e.g. <Method> return <thing> of the SecretStore.

@Lumexralph
Copy link
Copy Markdown
Contributor Author

@Skarlso I have no idea. I would have expected this to be the code but will give it a closer look.

@Lumexralph
Copy link
Copy Markdown
Contributor Author

@Skarlso I have looked at the reported duplications, and as @moolen said, it's referencing the godoc comments. So, looks like a false positive. Is there a way we can configure it to ignore godoc comments?

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 9, 2025

Okay fine by me.

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
@Lumexralph
Copy link
Copy Markdown
Contributor Author

@Skarlso @moolen, I don't know when sonarqube was configured, but I guess that since the new code added comments to the api packages, it detected them as new code and flagged them as duplicates, which is inevitable since they are api versions.

I excluded the packages from sonarqube, but if you have other suggestions, I'm happy to consider them.

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 10, 2025

Should be alright.

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
@github-actions github-actions bot added the kind/documentation Categorizes issue or PR as related to documentation. label Oct 12, 2025
@Lumexralph
Copy link
Copy Markdown
Contributor Author

Hi @Skarlso, any chance I can get this PR in so that I can finally add the PR for configuring the revive linter?

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 14, 2025

Yes, I'm trying. :D I just didn't have the time yet.

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 17, 2025

Okay, this looks right. Nothing is deleted this time. :D

@Skarlso
Copy link
Copy Markdown
Contributor

Skarlso commented Oct 17, 2025

/ok-to-test sha=232ad44e5d8e25b860c35c50088827bd84147295

@eso-service-account-app
Copy link
Copy Markdown
Contributor

@gusfcarvalho
Copy link
Copy Markdown
Member

Glanced at it - LGTM.

@gusfcarvalho
Copy link
Copy Markdown
Member

Will take another pass when I have more energy / focus to go over so many changes 😅

@Lumexralph
Copy link
Copy Markdown
Contributor Author

Lumexralph commented Oct 20, 2025

would have to wait before getting the last PR in because that'll configure the linter

@sonarqubecloud
Copy link
Copy Markdown

@Skarlso Skarlso merged commit 6f411f5 into external-secrets:main Oct 24, 2025
30 checks passed
SamuelMolling pushed a commit to SamuelMolling/external-secrets that referenced this pull request Oct 24, 2025
…secrets#5413)

* chore(linter): fix linter issue in api and cmd package

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* configure sonarqube to ignore godoc comments as duplicates

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update sonarqube config

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

* update the api docs

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>

---------

Signed-off-by: Olumide Ogundele <olumideralph@gmail.com>
Co-authored-by: Gergely Brautigam <skarlso777@gmail.com>
Signed-off-by: Samuel Molling <samuelmolling@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/linter kind/chore Categorizes Pull Requests for chore activities (like bumping versions) kind/documentation Categorizes issue or PR as related to documentation. size/l

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Configure revive properly

5 participants