roslynator
roslynator copied to clipboard
RCS1163 unused parameter error even with leading underscore
Hi,
I thought parameters starting with _ would be tolerated (i.e. would not raise an error) as of https://github.com/dotnet/roslynator/issues/244 / https://github.com/dotnet/roslynator/commit/0001c0c2063744809298ad824a3d351882c5c057 . There's even a test at the end of the commit!
Context: we're developing some Unity project, and it's well known for adding magic methods to do custom behaviors without explicitly implementing C# interfaces. For instance, this function would be invoked after assets have been loaded, and it needs four/five arguments, but we may not use all of them. Even with underscores, errors are raised.
error RCS1163: Unused parameter '_deletedAssets'.
...
I'm using Roslynator.Analyzers version 4.3.0. This happens both with roslynator version 0.9.3.0 and with dotnet (format) version 7.0.410.