github / github/codeql

.json files not included in database

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

Descrição

When creating a database with javascript as the language, I expect .json files to be included. But, they are not.

**Steps to reproduce**:

1. Create a folder `t`
2. Create the following files in it
1. **dummy.js** (This is only here to disable the warning that there is no code)
```
(function(){window.console.log("")})();
```
2. **file.json**
```
{
"M": "6"
}
```
3. Create the database
`codeql database create -s t -l javascript output`

The created database contains `dummy.js`, but not `file.json`.

I tested this with both CLI 2.10.0 and 2.10.1.

**Question**: Is this a bug? Or am I wrong when I assumed this is supposed to work? Are there any simple workarounds?

If you are wondering why I want this to work, the reason is that I want to write my own CodeQL queries to check some json configuration files.

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Reproduce the report with `codeql database create -s t -l javascript output` using the described `dummy.js` and `file.json` files, then inspect how JavaScript database creation selects source files. Done means the resulting database includes `file.json`, with coverage for the reported case and clear behavior for JSON configuration files.

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

Avaliação

Stack de tecnologia
javascript
Domínio
cli, devtools
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 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.