Skip to content

Commit 81eed58

Browse files
committed
Skip external help integration from forks
PRs from forks do not have access to the help repo.
1 parent 89bd9b4 commit 81eed58

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

.github/workflows/code-scanning-pack-gen.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jobs:
8080
8181
- name: Checkout external help files
8282
id: checkout-external-help-files
83+
# Forks do not have access to an appropriate token for the help files
84+
if: !github.event.pull_request.head.repo.fork
8385
uses: actions/checkout@v4
8486
with:
8587
ssh-key: ${{ secrets.CODEQL_CODING_STANDARDS_HELP_KEY }}
@@ -88,7 +90,7 @@ jobs:
8890
path: external-help-files
8991

9092
- name: Include external help files
91-
if: steps.checkout-external-help-files.outcome == 'success'
93+
if: !github.event.pull_request.head.repo.fork && steps.checkout-external-help-files.outcome == 'success'
9294
run: |
9395
pushd external-help-files
9496
find . -name '*.md' -exec rsync -av --relative {} "$GITHUB_WORKSPACE" \;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- `M0-1-3` - `UnusedLocalVariable.ql`:
2+
- Improve performance on codebases with a large number of variables with the same name.

cpp/autosar/src/rules/M0-1-3/UnusedLocalVariable.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ where
4848
not exists(v.getAnAccess()) and
4949
// Sometimes multiple objects representing the same entities are created in
5050
// the AST. Check if those are not accessed as well. Refer issue #658
51-
not exists(LocalScopeVariable another |
51+
not exists(PotentiallyUnusedLocalVariable another |
5252
another.getDefinitionLocation() = v.getDefinitionLocation() and
5353
another.hasName(v.getName()) and
5454
exists(another.getAnAccess()) and

0 commit comments

Comments
 (0)