question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Minor errors as reported by JetBrains Rider

See original GitHub issue

After 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.

Screen Shot 2019-12-25 at 9 54 40 PM

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.


Screen Shot 2019-12-25 at 9 55 19 PM

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.


Screen Shot 2019-12-25 at 9 55 32 PM

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.


Screen Shot 2019-12-25 at 9 55 46 PM

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.


Screen Shot 2019-12-25 at 9 56 32 PM

This one is same as above.


Screen Shot 2019-12-25 at 9 57 24 PM

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:closed
  • Created 4 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
NicolasDoriercommented, Dec 26, 2019

@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.

1reaction
bolatovumarcommented, Dec 26, 2019

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Solution-wide analysis | JetBrains Rider Documentation
JetBrains Rider allows you to flexibly ignore some errors or error-containing files and not include them into solution-wide analysis results.
Read more >
Code inspections | JetBrains Rider Documentation
Inspections with the fixed severity level 'Error'. These inspections detect compiler errors and there is no way to disable or configure them.
Read more >
Rider reports errors in working Unity project - YouTrack
After upgrading to the 2019.1 EAP rider starts showing 177 errors, all in Unity's internally generated files (.asset, .unity, .prefab).
Read more >
Inspection Severity | JetBrains Rider Documentation
Use this page to change the severity levels that JetBrains Rider assigns to issues found by each inspection or disable specific inspections.
Read more >
Build errors in Rider but builds fine with msbuild - YouTrack
When I build my solution in Rider, I get an error about a dependency: Db.Common.fs(8, 23): [FS3033] The type provider 'FSharp.Data.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found