Repository navigation
build(lint): enable go-style linter rules - #9
Conversation
Enable revive var-naming, receiver-naming, context-as-argument, error-return and flag-parameter, errcheck check-blank, testifylint, usetesting, thelper and ireturn. Forbid pkg, util and common directories in ls-lint. Refs furedea/agent-config#74 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Review summary: I found no blocking issues and posted no inline comments. This PR changes only lint configuration in
There is no runtime code change, so no tests are needed. The PR description says the rule was checked by temporarily creating 🤖 Generated with Claude Code |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a5225c1ed6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@codex review |
|
Review summary I found no blocking issues and posted no inline comments.
This PR only changes config, so there's no runtime behaviour that needs tests. |
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
概要
.golangci.ymlに revive 5 規則,errcheckcheck-blank,testifylint,usetesting,thelper,ireturnを追加した..ls-lint.ymlでpkg,util,commonディレクトリを禁止した.規則と置き換える文章
agents/skills/go-style/)var-namingID,URL,HTTP)receiver-namingcontext-as-argumentcontext.Contextは第 1 引数error-returnerrorは最後の戻り値flag-parametercheck-blank: true_でエラーを無視しないtestifylintrequire/assertの使い分けusetestingt.TempDir()/t.Setenv()thelpert.Helper()ireturn.dirでpkg/util/commonを禁止pkg/util/common/を作らないrevive は規則を明示列挙すると列挙したものだけが有効になるため,既存の列挙へ追記した.ls-lint は RE2 の正規表現に否定先読みがないため,
"**/{pkg,util,common}"キーに.dir: exists:0を指定した.違反件数(修正前)
全 11 規則で 0 件(
golangci-lint run ./...は0 issues.).ls-lint も 0 件で,pkg/(ファイルのみ),internal/util/,cmd/app/common/を一時的に作ると検出されることを確認した(確認後に退避済み).検証
nix develop --command golangci-lint run ./...(golangci-lint 2.14.0): 0 issuesls_lint: 違反なし.pkg/,internal/util/,cmd/app/common/を置くと失敗することを確認Refs furedea/agent-config#74
🤖 Generated with Claude Code