github / github/codeql

General issue

Aperta
#12,211 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
question
Lingua principale
CodeQL
Stelle
10.1k
Fork
2.1k
Merge medio
2g 15h
PR unite (30g)
141

Descrizione

I am looking at using CodeQL for my react app and am using the boiler plate to as much as n extent that I can.

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: security-and-quality

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

However, when adding poor conditions in the code such as

var unused : any;
if (unused == 'start')
console.log("something");
else if (unused == 'start')
console.log("something");

else
throw new Error("Message not understood.");

example https://codeql.github.com/codeql-query-help/javascript/js-duplicate-condition/

expecting CodeQL to throw an issue, this sailed through with no issues. Can someone please help and let me know what I have done wrong.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.