github / github/codeql

Certain syntaxes in ruby cause extraction errors

Ouverte
#14,279 2 commentaires 6 réactions 0 personnes assignées Voir sur GitHub
acknowledged question Ruby
Langage dominant
CodeQL
Étoiles
10.1k
Forks
2.1k
Merge moyen
2 j 15 h
PR mergées (30 j)
141

Description

The following ruby code causes an extraction error when parsed.

```ruby
def foo(bar: nil) = raise NotImplementedError
```

The error message is as follows.

```
Error: Extraction failed in [filepath] with error A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.
```

This code is correct ruby syntax.
This problem was reproduced with CodeQL version 2.4.5.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Reproduce the extraction failure with the Ruby snippet in the issue using CodeQL 2.4.5 or a current checkout. No source file, test, or entry point is named, so first locate the Ruby extraction and parsing tests, then add coverage for this valid syntax and confirm extraction succeeds without the parse error.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
ruby
Domaine
devtools
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
38/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.