-
Notifications
You must be signed in to change notification settings - Fork 0
General Code Audit #36
Comments
Lines 6 to 11 in 64c33b8
This makes the calling side to have the following code: using static sisbase.Utils.Behaviours; Proposed solutionRemove the nesting and move said enums to their own namespace so the calling side would be this instead: using sisbase.Utils.Enums; |
Line 163 in 64c33b8
Change the function declaration to use an |
Lines 182 to 204 in 64c33b8
|
|
var RegisteredCommands = cne.RegisteredCommands.Values.ToList(); | |
var groups = new List<CommandGroup>(); | |
foreach (var command in RegisteredCommands) | |
{ | |
if (command is CommandGroup group) | |
{ | |
if (groups.Contains(group)) continue; |
var groups = RegisteredCommands.Where(x => x is CommandGroup).Distinct();
|
if ((await group.RunChecksAsync(ctx, true)).Count() > 0) continue; | |
if (group.IsHidden && !showHidden) continue; |
Lines 84 to 85 in 64c33b8
if ((await command.RunChecksAsync(ctx, true)).Count() > 0) continue; | |
if (command.IsHidden && !showHidden) continue; |
/* public? */ async Task<bool> IsValidAsync(/*this?*/ Command c, bool hidden);
sisbase/Utils/IStaticSystem.cs Lines 3 to 8 in 64c33b8
|
Lines 34 to 35 in 64c33b8
|
Lines 64 to 67 in 64c33b8
|
Meta-issue with all points on the code base that may need to be looked again. If said issue is big enough another issue may be created because of it. For better organization, new issues must be posted as a comment first then edited on the original message.
Issues here can range from code quality to major bugs.
Tags
NRE
- Can cause / causes a NullReferenceException.EXC
- Can cause / causes an unhandled exception.CQ
- Code Quality.BUG
- Any bug. Includes unexpected behavior.API
- Issues on the current API design. Should have an proposal that addresses said issue annexed.Format
Use the copy permalink feature on github and describe the issue on that piece of code.
List
CQ
|API
-Behaviours
class works like a namespace, unnecessary nesting.CQ
|API
- EmbedBase.ListEmbed usesIEnumerable<T>
which is inconsistent with the api name, and likely could cause issues sinceIEnumerable
can be anything that provides an enumerator.CQ
- Complex nested code could be made into a functionThe text was updated successfully, but these errors were encountered: