github / github/codeql

Ruby: Error parsing embedded multiline blocks

Aberta
#19,841 1 comentário 0 reações 0 responsáveis Ver no GitHub
question
Linguagem predominante
CodeQL
Estrelas
10.1k
Forks
2.1k
Merge médio
2d 15h
PRs com merge (30d)
141

Descrição

**Description of the issue**

Seeing this error in the CodeQL run: `A parse error occurred. Check the syntax of the file. If the file is invalid, correct the error or exclude the file from analysis.`

The errored code block in question looks something like this and runs correctly.

```ruby
<<~BLOCKA
if some_condition?
<<~BLOCKB
BLOCKB
end
BLOCKA
```

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Start by reproducing the CodeQL parsing error with the embedded Ruby example in the issue, focusing on nested multiline blocks. Trace the Ruby parser handling of the heredoc-like syntax; done means valid code with this structure parses without the reported error.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
ruby
Domínio
compilers
Tipo de issue
Bug
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.