+
Skip to content

Conversation

chrisgrieser
Copy link
Contributor

@chrisgrieser chrisgrieser commented Sep 21, 2024

Summary

  • When running the biome cli, it reports: Please refactor this function to reduce its complexity score from 17 to the max allowed complexity 15.
  • In the editor, biome reports: Excessive complexity detected. (biome: lint/complexity/noExcessiveCognitiveComplexity)

see: #4012

This PR simply inserts the levels in the diagnostic message to fix that.

I haven't touched any rust code before, but the change seems straightforward enough, though.

@github-actions github-actions bot added A-Linter Area: linter L-JavaScript Language: JavaScript and super languages labels Sep 21, 2024
Copy link

codspeed-hq bot commented Sep 21, 2024

CodSpeed Performance Report

Merging #4028 will improve performances by 10.41%

Comparing chrisgrieser:noExcessiveCognitiveComplexity (b57824a) with main (f6e6cb6)

Summary

⚡ 1 improvements
✅ 106 untouched benchmarks

Benchmarks breakdown

Benchmark main chrisgrieser:noExcessiveCognitiveComplexity Change
db_17847247775464589309.json[cached] 14.2 ms 12.8 ms +10.41%

@chrisgrieser
Copy link
Contributor Author

chrisgrieser commented Sep 21, 2024

Fixed formatting and updated all tests for noExcessiveCognitiveComplexity for the change in the message output.

@dyc3 dyc3 merged commit 362da29 into biomejs:main Sep 21, 2024
11 checks passed
@chrisgrieser chrisgrieser deleted the noExcessiveCognitiveComplexity branch September 21, 2024 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter L-JavaScript Language: JavaScript and super languages

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载