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.

SA1313: Parameter '__' must begin with lower-case letter.

See original GitHub issue

I’m aware of #1606 and noticed in that issue it says that it should be fixed for 1.1.118. On my project I encourage people to create new issues for old bugs so doing the same here.

This seems to be happening in 1.1.118

So an example where it is happening is

            var viewLoaded = Observable.FromEvent<RoutedEventHandler, bool>(
                eventHandler =>
                {
                    void Handler(object _, RoutedEventArgs __) => eventHandler(true);
                    return Handler;
                },
                x => fe.Loading += x,
                x => fe.Loading -= x);

This is using a dependency on System.Reactive and it’s event observable converters.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:7
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
wiciokcommented, Nov 17, 2020

@sharwell This issue also happens for me on discarded method parameter:

public class ZXC
    {
        /// <summary>
        /// test.
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        public Task<IEnumerable<Bar>> HandleAsync(Foo _)
        {
            throw new System.NotImplementedException();
        }
    }

No use of local functions at all.

Version 1.2.0.261 (Unstable)

0reactions
DemetriouJohncommented, May 11, 2022

@DavidMartynWood if the whole point is to use discards, why not use single underscore which is also understood by the compiler? Am I missing something here?

Read more comments on GitHub >

github_iconTop Results From Across the Web

SA1313: Parameter '__' must begin with lower-case letter. ...
StyleCopAnalyzers seems to be OK with a single underscore, but not two underscores.
Read more >
stylecop - StyleCopAnalyzers/SA1313 in a positional record
As properties, these elements should be capitalized, but if I do it, SA1313 complains: Parameter '__' must begin with lower-case letter.
Read more >
Top StyleCop Coding Styles Part 3
SA1113 Comma Must Be on Same Line as Previous Parameter. CORRECT. INCORRECT ... SA1313 Parameter Names Must Begin with Lower Case Letter. CORRECT....
Read more >
The dotnet format command and StyleCop.Analyzers
Variable names should begin with lower-case letter --> <Rule Id="SA1313" Action="Warning" /> <!-- Parameter names should begin with ...
Read more >
https://raw.githubusercontent.com/dotnet/runtime/8...
Variable should begin with lower-case letter --> <Rule Id="SA1313" Action="None" /> <!-- Parameter should begin with lower-case letter --> <Rule Id="SA1314" ...
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