Skip to content

Conversation

@jamadeo
Copy link
Collaborator

@jamadeo jamadeo commented Aug 11, 2025

from https://rust-lang.github.io/rust-clippy/master/index.html#cognitive_complexity

What it does
We used to think it measured how hard a method is to understand.

Why is this bad?
Ideally, we would like to be able to measure how hard a function is to understand given its context (what we call its Cognitive Complexity). But that’s not what this lint does. See “Known problems”

Known problems
The true Cognitive Complexity of a method is not something we can calculate using modern technology. This lint has been left in the nursery so as to not mislead users into using this lint as a measurement tool.

Open to opinions on this but the fact that clippy themselves feel it's a bad measure doesn't seem great. I came to this because a violation for it here:

pub async fn oauth_flow(

When I looked into splitting this up, most options truly seemed to make it more complicated, not less.

@jamadeo
Copy link
Collaborator Author

jamadeo commented Aug 11, 2025

thoughts @lifeizhou-ap @DOsinga ?

@lifeizhou-ap
Copy link
Collaborator

thoughts @lifeizhou-ap @DOsinga ?

Hi @jamadeo thanks for the doc reference! That makes sense.

@jamadeo jamadeo merged commit dd50474 into main Aug 12, 2025
12 checks passed
@jamadeo jamadeo deleted the jackamadeo/turn-off-clippy-rule branch August 12, 2025 00:24
michaelneale added a commit that referenced this pull request Aug 12, 2025
* main:
  fix: enable 'goose://' handler for debian systems (#3952)
  fit: default ollama port (#4001)
  Remove cognitive complexity clippy lint (#4010)
zanesq added a commit that referenced this pull request Aug 12, 2025
…ndow

* 'main' of github.com:block/goose:
  sanitize message content on deserialization (#3966)
  Move summarize button inside of context view (#4015)
  blog: post on lead/worker model (#3994)
  Actually send cancellation to MCP servers (#3865)
  fix: enable 'goose://' handler for debian systems (#3952)
  fit: default ollama port (#4001)
  Remove cognitive complexity clippy lint (#4010)
  feat: add @-mention file reference expansion to .goosehints (#3873)
  feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941)
  Docs: provider and model run options (#4013)
  To-Do Tools (#3902)
  ci: correctly match doc only changes (#4009)
  Remove PR trigger for Linux build workflow (#4008)
  docs: update release docs with an additional step needed + adjust list formatting (#4005)
katzdave added a commit that referenced this pull request Aug 12, 2025
* 'main' of github.com:block/goose:
  Move summarize button inside of context view (#4015)
  blog: post on lead/worker model (#3994)
  Actually send cancellation to MCP servers (#3865)
  fix: enable 'goose://' handler for debian systems (#3952)
  fit: default ollama port (#4001)
  Remove cognitive complexity clippy lint (#4010)
  feat: add @-mention file reference expansion to .goosehints (#3873)
  feat(cli): Add --name/-n to session remove and --id/-i alias for session export (#3941)
  Docs: provider and model run options (#4013)
  To-Do Tools (#3902)
  ci: correctly match doc only changes (#4009)
  Remove PR trigger for Linux build workflow (#4008)
ayax79 pushed a commit to ayax79/goose that referenced this pull request Aug 21, 2025
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.

3 participants