Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable linter: maintidx #91

Closed
yitsushi opened this issue Sep 1, 2022 · 0 comments · Fixed by #177
Closed

enable linter: maintidx #91

yitsushi opened this issue Sep 1, 2022 · 0 comments · Fixed by #177
Assignees

Comments

@yitsushi
Copy link
Contributor

yitsushi commented Sep 1, 2022

maintidx measures the maintainability index of each function.

Default is 20, which is too low I think, but we have some extreme functions, for example:

name: push, Cyclomatic Complexity: 35
name: apply, Cyclomatic Complexity: 51
@yitsushi yitsushi mentioned this issue Sep 1, 2022
@yitsushi yitsushi self-assigned this Nov 8, 2022
yitsushi added a commit that referenced this issue Nov 8, 2022
Issues fixed:
- Fix issues with auto fix (`--fix`).
- Rename `this` receivers.
- Fix language issues, most of the duplicated words like "the the".
- Removed unnecessary type conversion.
- Reduced complexity of the `_apply` function by extracting some parts
  into a separate function.
- Reduced complexity of the `push` function by extracting some parts
  into a separate function.

References:
- #91

Closes #91
mandelsoft pushed a commit that referenced this issue Nov 10, 2022
* fix: enable linter: maintidx

Issues fixed:
- Fix issues with auto fix (`--fix`).
- Rename `this` receivers.
- Fix language issues, most of the duplicated words like "the the".
- Removed unnecessary type conversion.
- Reduced complexity of the `_apply` function by extracting some parts
  into a separate function.
- Reduced complexity of the `push` function by extracting some parts
  into a separate function.

References:
- #91

Closes #91

* address pr comments
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 a pull request may close this issue.

1 participant