Skip to content

Commit

Permalink
Skip external help integration from forks
Browse files Browse the repository at this point in the history
PRs from forks do not have access to the help repo.
  • Loading branch information
lcartey committed Dec 27, 2024
1 parent 89bd9b4 commit 81eed58
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/code-scanning-pack-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ jobs:
- name: Checkout external help files
id: checkout-external-help-files
# Forks do not have access to an appropriate token for the help files
if: !github.event.pull_request.head.repo.fork
uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.CODEQL_CODING_STANDARDS_HELP_KEY }}
Expand All @@ -88,7 +90,7 @@ jobs:
path: external-help-files

- name: Include external help files
if: steps.checkout-external-help-files.outcome == 'success'
if: !github.event.pull_request.head.repo.fork && steps.checkout-external-help-files.outcome == 'success'
run: |
pushd external-help-files
find . -name '*.md' -exec rsync -av --relative {} "$GITHUB_WORKSPACE" \;
Expand Down
2 changes: 2 additions & 0 deletions change_notes/2024-12-10-m0-1-3-perf.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- `M0-1-3` - `UnusedLocalVariable.ql`:
- Improve performance on codebases with a large number of variables with the same name.
2 changes: 1 addition & 1 deletion cpp/autosar/src/rules/M0-1-3/UnusedLocalVariable.ql
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ where
not exists(v.getAnAccess()) and
// Sometimes multiple objects representing the same entities are created in
// the AST. Check if those are not accessed as well. Refer issue #658
not exists(LocalScopeVariable another |
not exists(PotentiallyUnusedLocalVariable another |
another.getDefinitionLocation() = v.getDefinitionLocation() and
another.hasName(v.getName()) and
exists(another.getAnAccess()) and
Expand Down

0 comments on commit 81eed58

Please sign in to comment.