-
Notifications
You must be signed in to change notification settings - Fork 232
Conversation
Christopher Lowenthal seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
golangci.yml
Outdated
cyclop: | ||
# The maximal code complexity to report. | ||
# Default: 10 | ||
max-complexity: 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems insane. cyclomatic complexity isn't a great metric at the best of times, but ten? That's very solidly into "this is broken up into so many tiny pieces that reasoning about the tiny pieces becomes overwhelming" territory, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this will come down to a case per case basis.
But I'd like to keep this at the default for now, and we will adjust it as the code quality is tightened up.
golangci.yml
Outdated
# Default: false | ||
custom-order: true | ||
|
||
gocognit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we benefit from having both this and the cyclomatic thing? my default preference would be "neither" really.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as we're starting this I'd rather maximize signal, and deal with noise later.
Though to your previous comments, I updated this to its default of 30"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about the sheer volume of new linting here and want some idea what this reports and how much of what it reports is noise. Also, I'd really like to have all the things that say "deprecated, use [...]" be not-used, because that just seems like asking for trouble.
Agree with you @seebs. I just started with the reference and I've been pairing back. |
Kudos, SonarCloud Quality Gate passed! |
@@ -1131,8 +1131,7 @@ linters-settings: | |||
- name: context-as-argument | |||
severity: warning | |||
disabled: false | |||
arguments: | |||
- allowTypesBefore: "*testing.T,*github.com/user/repo/testing.Harness" | |||
arguments: [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it makes sense to have *testing.T
in that list, but if we don't happen to actually be using it, that doesn't seem important, we can always fix it later if we care.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like a reasonable starting point to me. I'm assuming that this won't result in a situation where we can't merge any changes until we make hundreds of large and intrusive changes, though, if I'm wrong, don't merge it yet. :)
No description provided.