Minor errors as reported by JetBrains Rider
See original GitHub issueAfter seeing @Kukks praise JetBrains Rider endlessly I decided to try it and it reported a few potential issues. I’m just gonna add them here in case any of these are actually issues and not just the IDE making things up.
Error is <BTCPayServer>\Controllers\ManageController.2FA.cs:6647 Cannot resolve view 'GenerateRecoveryCodesWarning'
.
This one is weird because this method doesn’t seem to be used anywhere outside of itself and there is no corresponding view. Not sure what’s going on here.
Error is: <BTCPayServer>\Controllers\ManageController.cs:5079 Cannot resolve view 'SendVerificationEmail'
.
This one is weird because this is a POST method but it tries to return a view which doesn’t exist if model state is not valid.
Error is: <BTCPayServer>\Views\Invoice\ListInvoices.cshtml:20248 Block statements must be enclosed in "{" and "}". You cannot use single-statement control-flow statements in CSHTML pages.
.
This one is pretty simple but I’m not sure if it’s actually a problem or the IDE just making things up. Won’t hurt to add the curly braces anyway.
Error is: <BTCPayServer>\Views\Server\CreateTemporaryFileUrl.cshtml:1089 Cannot choose method from method group. Did you intend to invoke the method?
.
Again, not sure if this is actually an issue but it does look weird. Wrapping the statement in curly braces does “fix” the issue and Rider becomes happy.
This one is same as above.
Errors are: <BTCPayServer>\Views\Server\_Nav.cshtml:121 Cannot resolve action 'Users'
and <BTCPayServer>\Views\Server\_Nav.cshtml:851 Cannot resolve action 'Logs'
.
This one makes sense since Users
and Logs
actions don’t actually exist, they are called something else. Renaming the actions “fixes” this issue.
Thoughts about these @NicolasDorier @Kukks?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@bolatovumar I wonder if it is possible to get the linters that Rider is using as part of the CI so we can catch this in the future.
@NicolasDorier ok, I tried the command line tool locally and it gives the same output as what you see in the IDE. It does take quite a bit of time to run though.
Command that I used was:
.\InspectCode.exe <path to btcpayserver.sln> --dotnetcoresdk=2.1.602 -o=<path to output file> --severity=ERROR --exclude="**/*.js;**/*.css"
.This command will only output ERROR severity issues (by default it gives much more) and excludes all *.js and *.css files.