-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Decrease cyclomatic complexity #2646
Labels
Milestone
Comments
ainar-g
added
enhancement
P4: Low
recurrent
Issues about things that need to be done several times.
labels
Feb 5, 2021
adguard
pushed a commit
that referenced
this issue
Feb 5, 2021
Merge in DNS/adguard-home from less-cyclo to master Updates #2646. Squashed commit of the following: commit 42f81c9 Merge: f61e236 42b88c3 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Feb 5 15:07:04 2021 +0300 Merge branch 'master' into less-cyclo commit f61e236 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Feb 5 15:06:02 2021 +0300 home: imp docs commit e3c2310 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jan 27 21:14:30 2021 +0300 all: imp cyclomatic complexity, minor improvements
adguard
pushed a commit
that referenced
this issue
Feb 9, 2021
Merge in DNS/adguard-home from imp-upgrade-test to master Updates #2639. Updates #2646. Squashed commit of the following: commit f7bd8e0 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 9 16:38:40 2021 +0300 home: imp test more commit 5b64131 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 9 16:09:22 2021 +0300 home: imp upgrade test
We were able to decrease the maximum complexity to 17 in this cycle. We'll try to reach 15 in the next cycle. |
There'll be a lot of rewrites in v0.108.0, so I'll move the issue there. |
adguard
pushed a commit
that referenced
this issue
Mar 1, 2023
Updates #2646. Squashed commit of the following: commit 9db0df7 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 1 13:24:12 2023 +0300 home: imp docs commit d1e4199 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 1 13:19:42 2023 +0300 home: imp docs, names commit 1763686 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 28 20:45:50 2023 +0300 all: imp cyclo, docs; use netip.Addr
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
…mprovements Merge in DNS/adguard-home from less-cyclo to master Updates AdguardTeam#2646. Squashed commit of the following: commit 42f81c9 Merge: f61e236 42b88c3 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Feb 5 15:07:04 2021 +0300 Merge branch 'master' into less-cyclo commit f61e236 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Fri Feb 5 15:06:02 2021 +0300 home: imp docs commit e3c2310 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Jan 27 21:14:30 2021 +0300 all: imp cyclomatic complexity, minor improvements
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Merge in DNS/adguard-home from imp-upgrade-test to master Updates AdguardTeam#2639. Updates AdguardTeam#2646. Squashed commit of the following: commit f7bd8e0 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 9 16:38:40 2021 +0300 home: imp test more commit 5b64131 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 9 16:09:22 2021 +0300 home: imp upgrade test
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#1401. Updates AdguardTeam#2646. Squashed commit of the following: commit 93b025a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 24 16:41:07 2021 +0300 home: fix migration, imp code
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646. Squashed commit of the following: commit c83c230 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Mar 25 19:47:11 2021 +0300 all: imp code, decr cyclo
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646. Squashed commit of the following: commit c153f08 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Mar 25 21:03:51 2021 +0300 dnsfilter: imp code, decr cyclo
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646. Squashed commit of the following: commit b362aff Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Mar 25 21:13:30 2021 +0300 dnsforward: imp code, decr cyclo
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646. Squashed commit of the following: commit 0a5ff6a Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu May 20 14:07:08 2021 +0300 home: imp code commit 2af0f46 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu May 20 13:48:08 2021 +0300 home: imp whois parse
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646, Squashed commit of the following: commit af6a6fa Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon May 31 20:00:36 2021 +0300 all: imp code, docs commit 1cd4781 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Mon May 31 18:51:23 2021 +0300 all: imp cyclo in new code
heyxkhoa
pushed a commit
to heyxkhoa/AdGuardHome
that referenced
this issue
Mar 20, 2023
Updates AdguardTeam#2646. Squashed commit of the following: commit 9db0df7 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 1 13:24:12 2023 +0300 home: imp docs commit d1e4199 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Wed Mar 1 13:19:42 2023 +0300 home: imp docs, names commit 1763686 Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Tue Feb 28 20:45:50 2023 +0300 all: imp cyclo, docs; use netip.Addr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Right now we set
gocyclo
to allow the maximum cyclomatic complexly of of 20. McCabe originally recommended to limit the value to no more than 10, but NIST later observed that values up to 15 may be allowed in some cases. I think we should at least strive to decrease it to 15 and see if continuing will do more good than harm.I also don't think that decreasing it all in one go is a good choice, so I'll make this ticket a recurrent one and gradually decrease the complexity as we go.
The text was updated successfully, but these errors were encountered: