16 KiB
16 KiB
Qodana Inspection Results
This document outlines the problems detected in the codebase by the Qodana scan.
ArrangeObjectCreationWhenTypeEvident
Found 6 occurrences.
- Configuration/ToakConfig.cs (Line 20): Redundant type specification [note]
- Core/Skills/SkillRegistry.cs (Line 12): Redundant type specification [note]
- Core/Skills/SkillRegistry.cs (Line 69): Redundant type specification [note]
- Core/Skills/SkillRegistry.cs (Line 79): Redundant type specification [note]
- Core/Skills/SkillRegistry.cs (Line 90): Redundant type specification [note]
- Core/Skills/SkillRegistry.cs (Line 104): Redundant type specification [note]
AsyncMethodWithoutAwait
Found 9 occurrences.
- Commands/ConfigUpdaterCommand.cs (Line 9): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/HistoryCommand.cs (Line 14): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/OnboardCommand.cs (Line 13): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/ShowCommand.cs (Line 9): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/SkillCommand.cs (Line 37): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/SkillCommand.cs (Line 68): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/SkillCommand.cs (Line 110): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Commands/StatsCommand.cs (Line 12): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
- Core/TranscriptionOrchestrator.cs (Line 45): This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls or drop 'async' to avoid generating state machine for this method [note]
ClassNeverInstantiated.Global
Found 1 occurrences.
- Program.cs (Line 7): Class 'Program' is never instantiated [note]
ConditionalAccessQualifierIsNonNullableAccordingToAPIContract
Found 4 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 89): Conditional access qualifier expression is never null according to nullable reference types' annotations [warning]
- Api/OpenAiCompatibleClient.cs (Line 89): Conditional access qualifier expression is never null according to nullable reference types' annotations [warning]
- Api/OpenAiCompatibleClient.cs (Line 135): Conditional access qualifier expression is never null according to nullable reference types' annotations [warning]
- Api/OpenAiCompatibleClient.cs (Line 135): Conditional access qualifier expression is never null according to nullable reference types' annotations [warning]
ConvertClosureToMethodGroup
Found 1 occurrences.
- Commands/SkillCommand.cs (Line 31): Convert into method group [note]
ConvertIfStatementToConditionalTernaryExpression
Found 3 occurrences.
- Core/DaemonService.cs (Line 58): Convert into '?:' expression [note]
- Commands/LatencyTestCommand.cs (Line 76): Convert into method call with '?:' expression inside [note]
- Commands/StatusCommand.cs (Line 36): Convert into method call with '?:' expression inside [note]
ConvertToPrimaryConstructor
Found 6 occurrences.
- Audio/AudioRecorder.cs (Line 16): Convert into primary constructor [note]
- Audio/FfmpegAudioRecorder.cs (Line 17): Convert into primary constructor [note]
- Core/Skills/DynamicSkill.cs (Line 16): Convert into primary constructor [note]
- Core/TranscriptionOrchestrator.cs (Line 23): Convert into primary constructor [note]
- IO/ClipboardManager.cs (Line 11): Convert into primary constructor [note]
- IO/TextInjector.cs (Line 13): Convert into primary constructor [note]
EmptyConstructor
Found 2 occurrences.
- Configuration/ConfigManager.cs (Line 15): Empty constructor is redundant. The compiler generates the same by default. [warning]
- Core/HistoryManager.cs (Line 16): Empty constructor is redundant. The compiler generates the same by default. [warning]
EmptyGeneralCatchClause
Found 1 occurrences.
- Core/DaemonService.cs (Line 42): Empty general catch clause suppresses any errors [warning]
FieldCanBeMadeReadOnly.Global
Found 1 occurrences.
- Core/Skills/SkillRegistry.cs (Line 12): Field can be made readonly [note]
InconsistentNaming
Found 7 occurrences.
- Configuration/ConfigManager.cs (Line 12): Name 'ConfigDir' does not match rule 'Instance fields (private)'. Suggested name is '_configDir'. [warning]
- Configuration/ConfigManager.cs (Line 13): Name 'ConfigPath' does not match rule 'Instance fields (private)'. Suggested name is '_configPath'. [warning]
- Core/HistoryManager.cs (Line 13): Name 'HistoryDir' does not match rule 'Instance fields (private)'. Suggested name is '_historyDir'. [warning]
- Core/HistoryManager.cs (Line 14): Name 'HistoryFile' does not match rule 'Instance fields (private)'. Suggested name is '_historyFile'. [warning]
- Core/StateTracker.cs (Line 7): Name 'StateFilePath' does not match rule 'Instance fields (private)'. Suggested name is '_stateFilePath'. [warning]
- Audio/AudioRecorder.cs (Line 12): Name 'WavPath' does not match rule 'Instance fields (private)'. Suggested name is '_wavPath'. [warning]
- Audio/FfmpegAudioRecorder.cs (Line 13): Name 'WavPath' does not match rule 'Instance fields (private)'. Suggested name is '_wavPath'. [warning]
MemberCanBePrivate.Global
Found 1 occurrences.
- Core/Constants.cs (Line 8): Constant 'AppName' can be made private [note]
MergeIntoPattern
Found 1 occurrences.
- Core/TranscriptionOrchestrator.cs (Line 101): Merge into pattern [note]
MethodHasAsyncOverload
Found 9 occurrences.
- Commands/HistoryCommand.cs (Line 58): Method has async overload [note]
- Commands/HistoryCommand.cs (Line 59): Method has async overload [note]
- Commands/HistoryCommand.cs (Line 63): Method has async overload [note]
- Commands/HistoryCommand.cs (Line 64): Method has async overload [note]
- Commands/HistoryCommand.cs (Line 65): Method has async overload [note]
- Commands/LatencyTestCommand.cs (Line 37): Method has async overload [note]
- Commands/OnboardCommand.cs (Line 119): Method has async overload [note]
- Commands/SkillCommand.cs (Line 51): Method has async overload [note]
- Commands/SkillCommand.cs (Line 105): Method has async overload [note]
MoveVariableDeclarationInsideLoopCondition
Found 1 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 125): Variable 'line' can be declared inside loop condition [note]
NotAccessedField.Local
Found 1 occurrences.
- Core/DaemonService.cs (Line 21): Field '_lockFile' is assigned but its value is never used [warning]
RedundantDefaultMemberInitializer
Found 2 occurrences.
- Api/Models/OpenAiModels.cs (Line 20): Initializing property by default value is redundant [warning]
- Core/Logger.cs (Line 5): Initializing property by default value is redundant [warning]
RedundantExplicitParamsArrayCreation
Found 7 occurrences.
- Commands/OnboardCommand.cs (Line 31): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/OnboardCommand.cs (Line 44): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/OnboardCommand.cs (Line 51): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/OnboardCommand.cs (Line 60): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/OnboardCommand.cs (Line 66): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/OnboardCommand.cs (Line 93): Redundant explicit collection creation in argument of 'params' parameter [note]
- Commands/SkillCommand.cs (Line 81): Redundant explicit collection creation in argument of 'params' parameter [note]
RedundantNameQualifier
Found 35 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 25): Qualifier is redundant [warning]
- Api/OpenAiCompatibleClient.cs (Line 35): Qualifier is redundant [warning]
- Api/OpenAiCompatibleClient.cs (Line 60): Qualifier is redundant [warning]
- Api/OpenAiCompatibleClient.cs (Line 64): Qualifier is redundant [warning]
- Api/OpenAiCompatibleClient.cs (Line 92): Qualifier is redundant [warning]
- Api/OpenAiCompatibleClient.cs (Line 96): Qualifier is redundant [warning]
- Commands/ConfigUpdaterCommand.cs (Line 11): Qualifier is redundant [warning]
- Commands/OnboardCommand.cs (Line 15): Qualifier is redundant [warning]
- Commands/OnboardCommand.cs (Line 124): Qualifier is redundant [warning]
- Commands/ShowCommand.cs (Line 11): Qualifier is redundant [warning]
- Configuration/ToakConfig.cs (Line 15): Qualifier is redundant [warning]
- Configuration/ToakConfig.cs (Line 17): Qualifier is redundant [warning]
- Core/Interfaces/Interfaces.cs (Line 16): Qualifier is redundant [warning]
- Core/Interfaces/Interfaces.cs (Line 21): Qualifier is redundant [warning]
- Core/Interfaces/Interfaces.cs (Line 22): Qualifier is redundant [warning]
- Core/Skills/SkillDefinition.cs (Line 7): Qualifier is redundant [warning]
- Core/TranscriptionOrchestrator.cs (Line 99): Qualifier is redundant [warning]
- IO/ClipboardManager.cs (Line 28): Qualifier is redundant [warning]
- IO/ClipboardManager.cs (Line 38): Qualifier is redundant [warning]
- IO/Notifications.cs (Line 19): Qualifier is redundant [warning]
- ... and 15 more occurrences.
RedundantStringInterpolation
Found 6 occurrences.
- IO/TextInjector.cs (Line 28): Redundant string interpolation [note]
- IO/TextInjector.cs (Line 39): Redundant string interpolation [note]
- IO/TextInjector.cs (Line 50): Redundant string interpolation [note]
- IO/TextInjector.cs (Line 78): Redundant string interpolation [note]
- IO/TextInjector.cs (Line 90): Redundant string interpolation [note]
- IO/TextInjector.cs (Line 109): Redundant string interpolation [note]
RedundantTypeDeclarationBody
Found 2 occurrences.
- Serialization/AppJsonSerializerContext.cs (Line 24): Redundant empty class declaration body [note]
- Serialization/AppJsonSerializerContext.cs (Line 30): Redundant empty class declaration body [note]
RedundantUsingDirective
Found 62 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Audio/AudioRecorder.cs (Line 4): Using directive is not required by the code and can be safely removed [warning]
- Audio/FfmpegAudioRecorder.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Audio/FfmpegAudioRecorder.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Audio/FfmpegAudioRecorder.cs (Line 6): Using directive is not required by the code and can be safely removed [warning]
- Commands/ConfigUpdaterCommand.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Commands/DiscardCommand.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Commands/DiscardCommand.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 2): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 4): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 5): Using directive is not required by the code and can be safely removed [warning]
- Commands/HistoryCommand.cs (Line 6): Using directive is not required by the code and can be safely removed [warning]
- Commands/LatencyTestCommand.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Commands/LatencyTestCommand.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Commands/LatencyTestCommand.cs (Line 4): Using directive is not required by the code and can be safely removed [warning]
- Commands/OnboardCommand.cs (Line 1): Using directive is not required by the code and can be safely removed [warning]
- Commands/OnboardCommand.cs (Line 3): Using directive is not required by the code and can be safely removed [warning]
- Commands/OnboardCommand.cs (Line 4): Using directive is not required by the code and can be safely removed [warning]
- ... and 42 more occurrences.
UnusedMember.Global
Found 2 occurrences.
- Core/Interfaces/Interfaces.cs (Line 41): Method 'InjectTextAsync' is never used [note]
- Core/Skills/ISkill.cs (Line 6): Property 'Description' is never used [note]
UnusedMemberInSuper.Global
Found 3 occurrences.
- Core/Interfaces/Interfaces.cs (Line 48): Only implementations of method 'ClearHistory' are used [note]
- Core/Interfaces/Interfaces.cs (Line 47): Only implementations of method 'LoadHistory' are used [note]
- Core/Interfaces/Interfaces.cs (Line 11): Only implementations of method 'SaveConfig' are used [note]
UnusedParameter.Global
Found 1 occurrences.
- Commands/SkillCommand.cs (Line 14): Parameter 'verboseOption' is never used [note]
UnusedVariable
Found 2 occurrences.
- Commands/LatencyTestCommand.cs (Line 60): Local variable 'refinedText' is never used [warning]
- Commands/LatencyTestCommand.cs (Line 54): Local variable 'transcript' is never used [warning]
UseAwaitUsing
Found 3 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 29): Use 'await using' [note]
- Api/OpenAiCompatibleClient.cs (Line 122): Use 'await using' [note]
- Commands/HistoryCommand.cs (Line 57): Use 'await using' [note]
UseCollectionExpression
Found 12 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 67): Use collection expression [note]
- Api/OpenAiCompatibleClient.cs (Line 100): Use collection expression [note]
- Commands/StatsCommand.cs (Line 33): Use collection expression [note]
- Configuration/ToakConfig.cs (Line 20): Use collection expression [note]
- Core/HistoryManager.cs (Line 43): Use collection expression [note]
- Core/Skills/SkillRegistry.cs (Line 73): Use collection expression [note]
- Core/Skills/SkillRegistry.cs (Line 83): Use collection expression [note]
- Core/Skills/SkillRegistry.cs (Line 94): Use collection expression [note]
- Core/Skills/SkillRegistry.cs (Line 108): Use collection expression [note]
- Program.cs (Line 13): Use collection expression [note]
- Program.cs (Line 15): Use collection expression [note]
- Program.cs (Line 87): Use collection expression [note]
UsingStatementResourceInitialization
Found 1 occurrences.
- Api/OpenAiCompatibleClient.cs (Line 109): Initialize object properties inside the 'using' statement to ensure that the object is disposed if an exception is thrown during initialization [warning]