Skip to content

Commit

Permalink
Only check methods with ConCmd.Server attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-r-g committed May 15, 2023
1 parent 2a228bb commit 495bda0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SboxAnalyzers/ServerCmdAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ private static void AnalyzeMethodDeclaration( SyntaxNodeAnalysisContext context
if ( methodDeclaration.ParameterList is null )
return;

if ( !methodDeclaration.HasAttribute( "ConCmd.Server" ) )
return;

// Check that all parameters are networkable in server commands.
foreach ( var parameter in methodDeclaration.ParameterList.Parameters )
{
Expand Down

0 comments on commit 495bda0

Please sign in to comment.