Skip to content

RCS1163 unused parameter error... #244

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
usmrtester opened this issue Jan 3, 2018 · 1 comment
Closed

RCS1163 unused parameter error... #244

usmrtester opened this issue Jan 3, 2018 · 1 comment

Comments

@usmrtester
Copy link

.net 4.0, c# 7.2 Roslynator 1.6.10

The following line of code produces RCS1163, Unused parameter (list). I believe this to be an error as 'list' is required for this lambda expression.

lReasons = lReasons.OrderBy(list => ranDom.Next()).ToList();

@josefpihrt
Copy link
Collaborator

RCS1163 is reported when parameter (or lambda parameter) is not used which is exactly this case.

Common approach to this concrete case would to to suppress this diagnostic (see How to Suppress).

Also, I'm thinking about possibility that RCS1163 would not be reported if the parameter name is '_' (see #245).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants