github / github/codeql

LGTM.com - false positive - c# top-level statements

オープン
#7,916 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
false-positive
主要言語
CodeQL
スター
10.1k
フォーク
2.1k
平均マージ
2日 15時間
マージ済み PR(30日)
141

説明

**Description of the false positive**

C# top-level statements are causing an extraction error.

e.g.
```csharp
namespace My.Name.Space;

public class MyClass
{
// ...
}
```

```
Unexpected C# extractor error: Unhandled top-level syntax node
at Semmle.Extraction.CSharp.Populators.TypeContainerVisitor.DefaultVisit(SyntaxNode node) in /home/runner/work/semmle-code/semmle-code/ql/csharp/extractor/Semmle.Extraction.CSharp/Populators/TypeContainerVisitor.cs:line 39
at Microsoft.CodeAnalysis.CSharp.CSharpSyntaxVisitor.VisitFileScopedNamespaceDeclaration(FileScopedNamespaceDeclarationSyntax node)
at Microsoft.CodeAnalysis.CSharp.Syntax.FileScopedNamespaceDeclarationSyntax.Accept(CSharpSyntaxVisitor visitor)
at Semmle.Extraction.CSharp.Populators.CompilationUnitVisitor.<>c__DisplayClass2_0.b__0() in /home/runner/work/semmle-code/semmle-code/ql/csharp/extractor/Semmle.Extraction.CSharp/Populators/CompilationUnitVisitor.cs:line 28
at Semmle.Extraction.Context.Try(SyntaxNode node, ISymbol symbol, Action a) in /home/runner/work/semmle-code/semmle-code/ql/csharp/extractor/Semmle.Extraction/Context.cs:line 484
```

**URL to the alert on the project page on LGTM.com**

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。