Skip to content

Enable dotnet built-in code analysis (#7) #13

Enable dotnet built-in code analysis (#7)

Enable dotnet built-in code analysis (#7) #13

Triggered via push January 16, 2024 05:09
Status Failure
Total duration 49s
Artifacts 1

bot.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

1 error, 20 warnings, and 10 notices
inspect
Issues found.
build: Bot/Sql/Db.cs#L7
Unused field 's_db' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1823)
build: Bot/Sql/Db.cs#L7
Private member 'Db.s_db' can be removed as the value assigned to it is never read (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0052)
build: Bot/Discord.cs#L12
Accessibility modifiers required (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0040)
build: Bot/Secrets.cs#L8
Initialize all static fields in 'Secrets' when those fields are declared and remove the explicit static constructor (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1810)
build: Bot/Discord.cs#L28
'DiscordSocketClient.GetChannel(ulong)' synchronously blocks. Await 'DiscordSocketClient.GetChannelAsync(ulong, RequestOptions)' instead. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/quality-rules/ca1849)
build: Bot/Coc.cs#L81
Add braces to 'if' statement. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0011)
build: Bot/Coc.cs#L82
Add braces to 'if' statement. (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0011)
build: Bot/Discord.cs#L29
Expression value is never used (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0058)
build: Bot/Coc.cs#L80
Use explicit type instead of 'var' (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0008)
build: Bot/Coc.cs#L32
Expression value is never used (https://learn.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/ide0058)
inspect: Bot/Coc.cs#L6
"[CA1852] Type 'Coc' can be sealed because it has no subtypes in its containing assembly and is not externally visible" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(6,88)
inspect: Bot/Coc.cs#L15
"[CA1852] Type 'ClanUtil' can be sealed because it has no subtypes in its containing assembly and is not externally visible" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(15,296)
inspect: Bot/Coc.cs#L17
"[NotAccessedField.Local] Field 'Clan' is assigned but its value is never used" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(17,342)
inspect: Bot/Coc.cs#L20
"[CollectionNeverQueried.Local] Content of collection 'JoiningMembers' is only updated but never used" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(20,555)
inspect: Bot/Coc.cs#L32
"[IDE0058] Expression value is never used" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(32,1012)
inspect: Bot/Coc.cs#L42
"[UnusedParameter.Local] Parameter 'init' is never used" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(42,1271)
inspect: Bot/Coc.cs#L58
"[CA1812] 'Coc.MemberComparer' is an internal class that is apparently never instantiated. If so, remove the code from the assembly. If this class is intended to contain only static members, make it 'static' (Module in Visual Basic)." on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(58,1638)
inspect: Bot/Coc.cs#L58
"[UnusedType.Local] Class 'MemberComparer' is never used" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(58,1638)
inspect: Bot/Coc.cs#L58
"[CA1852] Type 'MemberComparer' can be sealed because it has no subtypes in its containing assembly and is not externally visible" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(58,1638)
inspect: Bot/Coc.cs#L60
"[IDE0022] Use block body for method" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(60,1699)
inspect: Bot/Coc.cs#L6
"[ClassNeverInstantiated.Global] Class 'Coc' is never instantiated" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(6,88)
inspect: Bot/Coc.cs#L20
"[MemberCanBePrivate.Local] Field 'JoiningMembers' can be made private" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(20,506)
inspect: Bot/Coc.cs#L21
"[MemberCanBePrivate.Local] Field 'LeavingMembers' can be made private" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(21,584)
inspect: Bot/Coc.cs#L26
"[SuggestVarOrType_SimpleTypes] Use 'var' (simple types)" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(26,767)
inspect: Bot/Coc.cs#L45
"[SuggestVarOrType_SimpleTypes] Use 'var' (simple types)" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(45,1341)
inspect: Bot/Coc.cs#L52
"[MemberCanBePrivate.Local] Method 'HasMember' can be made private" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(52,1498)
inspect: Bot/Coc.cs#L52
"[SuggestBaseTypeForParameter] Parameter can be of type 'ClashOfClans.Models.Identity'" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(52,1522)
inspect: Bot/Coc.cs#L67
"[MemberCanBePrivate.Global] Field 's_client' can be made private" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(67,1954)
inspect: Bot/Coc.cs#L91
"[SuggestVarOrType_BuiltInTypes] Use 'var' (built-in types)" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(91,2904)
inspect: Bot/Coc.cs#L93
"[SuggestVarOrType_SimpleTypes] Use 'var' (simple types)" on /home/runner/work/Hyperstellar/Hyperstellar/Bot/Coc.cs(93,2967)

Artifacts

Produced during runtime
Name Size
Bot Expired
5.48 MB