Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf0e1969

Browse files
authored
Merge branch 'main' into dependabot/pip/scripts/release/gitpython-3.1.37
2 parentsbfab513 +5e17d21 commitf0e1969

File tree

23 files changed

+244
-83
lines changed

23 files changed

+244
-83
lines changed

‎.github/workflows/tooling-unit-tests.yml‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,22 @@ jobs:
9696
-name:Run PyTest
9797
run:|
9898
pytest scripts/guideline_recategorization/recategorize_test.py
99+
100+
release-tests:
101+
name:Run release tests
102+
runs-on:ubuntu-22.04
103+
steps:
104+
-name:Checkout
105+
uses:actions/checkout@v2
106+
107+
-name:Install Python
108+
uses:actions/setup-python@v4
109+
with:
110+
python-version:"3.9"
111+
112+
-name:Install Python dependencies
113+
run:pip install -r scripts/release/requirements.txt
114+
115+
-name:Run PyTest
116+
run:|
117+
pytest scripts/release/update_release_assets_test.py
Lines changed: 26 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
name:"Update Release Status"
22
on:
3-
check_run:
4-
types:
5-
-completed
6-
-rerequested
7-
branches:
8-
-"rc/**"
9-
103
workflow_dispatch:
114
inputs:
125
head-sha:
@@ -20,40 +13,36 @@ permissions:
2013
checks:write
2114
contents:write
2215

16+
env:
17+
HEAD_SHA:${{ inputs.head-sha }}
18+
2319
jobs:
2420
validate-check-runs:
2521
runs-on:ubuntu-22.04
2622
outputs:
2723
status:${{ steps.set-output.outputs.status }}
28-
check-run-head-sha:${{ steps.set-output.outputs.check-run-head-sha }}
24+
conclusion:${{ steps.set-output.outputs.conclusion }}
2925
steps:
30-
-name:Determine check run head SHA
31-
env:
32-
HEAD_SHA_FROM_EVENT:${{ github.event.check_run.head_sha }}
33-
HEAD_SHA_FROM_INPUTS:${{ inputs.head-sha }}
34-
run:|
35-
if [[ $GITHUB_EVENT_NAME == "workflow_dispatch" ]]; then
36-
echo "CHECK_RUN_HEAD_SHA=$HEAD_SHA_FROM_INPUTS" >> "$GITHUB_ENV"
37-
else
38-
echo "CHECK_RUN_HEAD_SHA=$HEAD_SHA_FROM_EVENT" >> "$GITHUB_ENV"
39-
fi
40-
4126
-name:Checkout
4227
uses:actions/checkout@v4
4328
with:
44-
ref:${{env.CHECK_RUN_HEAD_SHA }}
29+
ref:${{inputs.head-sha }}
4530

4631
-name:Get release status check run
4732
id:get-check-run
48-
if:(github.event_name == 'check_run' && github.event.check_run.conclusion == 'success' && github.event.check_run.name != github.workflow) || github.event_name == 'workflow_dispatch'
4933
env:
5034
GITHUB_TOKEN:${{ github.token }}
5135
run:|
5236
check_run_info=$(gh api \
5337
--header "Accept: application/vnd.github+json" \
5438
--header "X-GitHub-Api-Version: 2022-11-28" \
5539
--jq '.check_runs[] | select(.name == "release-status") | {id: .id, status: .status, conclusion: .conclusion}' \
56-
/repos/$GITHUB_REPOSITORY/commits/$CHECK_RUN_HEAD_SHA/check-runs)
40+
/repos/$GITHUB_REPOSITORY/commits/$HEAD_SHA/check-runs)
41+
42+
if [[ -z "$check_run_info" ]]; then
43+
echo "No release status check run found"
44+
exit 1
45+
fi
5746
5847
check_run_id=$(echo "$check_run_info" | jq -r '.id')
5948
check_run_status=$(echo "$check_run_info" | jq -r '.status')
@@ -64,19 +53,22 @@ jobs:
6453
echo "CHECK_RUN_CONCLUSION=$check_run_conclusion" >> "$GITHUB_ENV"
6554
6655
-name:Reset release status
67-
if:env.CHECK_RUN_STATUS == 'completed' && ((github.event_name == 'check_run' && github.event.action == 'rerequested') || github.event_name == 'workflow_dispatch')
56+
if:env.CHECK_RUN_STATUS == 'completed'
6857
env:
6958
GITHUB_TOKEN:${{ github.token }}
7059
run:|
71-
CHECK_RUN_ID=$(gh api \
60+
check_run_id=$(gh api \
7261
--header "Accept: application/vnd.github+json" \
7362
--header "X-GitHub-Api-Version: 2022-11-28" \
7463
--field name="release-status" \
75-
--field head_sha="$CHECK_RUN_HEAD_SHA" \
64+
--field head_sha="$HEAD_SHA" \
7665
--jq ".id" \
7766
/repos/$GITHUB_REPOSITORY/check-runs)
7867
79-
echo "Created release status check run with id $CHECK_RUN_ID"
68+
echo "Created release status check run with id $check_run_id"
69+
# Reset the status to in progress.
70+
echo "CHECK_RUN_STATUS=in_progress" >> "$GITHUB_ENV"
71+
echo "CHECK_RUN_ID=$check_run_id" >> "$GITHUB_ENV"
8072
8173
-name:Check all runs completed
8274
if:env.CHECK_RUN_STATUS != 'completed'
@@ -87,10 +79,12 @@ jobs:
8779
--header "Accept: application/vnd.github+json" \
8880
--header "X-GitHub-Api-Version: 2022-11-28" \
8981
--jq '.check_runs | map(select(.name != "release-status"))' \
90-
/repos/$GITHUB_REPOSITORY/commits/$CHECK_RUN_HEAD_SHA/check-runs)
82+
/repos/$GITHUB_REPOSITORY/commits/$HEAD_SHA/check-runs)
9183
9284
status_stats=$(echo "$check_runs" | jq -r '. | {failed: (map(select(.conclusion == "failure")) | length), pending: (map(select(.status != "completed")) | length) }')
9385
86+
echo "status_stats=$status_stats"
87+
9488
failed=$(echo "$status_stats" | jq -r '.failed')
9589
pending=$(echo "$status_stats" | jq -r '.pending')
9690
@@ -101,7 +95,6 @@ jobs:
10195
if:env.CHECK_RUNS_PENDING == '0' && env.CHECK_RUN_STATUS != 'completed'
10296
env:
10397
GITHUB_TOKEN:${{ github.token }}
104-
CHECK_RUNS_FAILED:${{ env.check-runs-failed }}
10598
run:|
10699
if [[ "$CHECK_RUNS_FAILED" == "0" ]]; then
107100
echo "All check runs succeeded"
@@ -123,22 +116,23 @@ jobs:
123116
--input - \
124117
/repos/$GITHUB_REPOSITORY/check-runs/$CHECK_RUN_ID
125118
119+
echo "RELEASE_STATUS_CONCLUSION=$conclusion" >> "$GITHUB_ENV"
120+
126121
-name:Set output
127122
id:set-output
128123
run:|
124+
echo "conclusion=$RELEASE_STATUS_CONCLUSION" >> "$GITHUB_OUTPUT"
129125
if [[ "$CHECK_RUNS_PENDING" == "0" ]]; then
130126
echo "status=completed" >> "$GITHUB_OUTPUT"
131127
else
132128
echo "status=in_progress" >> "$GITHUB_OUTPUT"
133129
fi
134130
135-
echo "check-run-head-sha=$CHECK_RUN_HEAD_SHA" >> "$GITHUB_OUTPUT"
136-
137131
update-release:
138132
needs:validate-check-runs
139-
if:needs.validate-check-runs.outputs.status == 'completed'
133+
if:needs.validate-check-runs.outputs.status == 'completed' && needs.validate-check-runs.outputs.conclusion == 'success'
140134
uses:./.github/workflows/update-release.yml
141135
with:
142-
head-sha:${{needs.validate-check-runs.outputs.check-run-head-sha }}
136+
head-sha:${{inputs.head-sha }}
143137
secrets:
144138
AUTOMATION_PRIVATE_KEY:${{ secrets.AUTOMATION_PRIVATE_KEY }}

‎.github/workflows/update-release.yml‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
-name:Checkout
3131
uses:actions/checkout@v4
3232
with:
33-
ref:${{ inputs.head-sha }}
33+
fetch-depth:0# We need the full history to compute the changelog
3434

3535
-name:Install Python
3636
uses:actions/setup-python@v4
@@ -54,13 +54,12 @@ jobs:
5454
GITHUB_TOKEN:${{ github.token }}
5555
RELEASE_ENGINEERING_TOKEN:${{ steps.generate-token.outputs.token }}
5656
run:|
57-
python scripts/release/update-release-assets.py \
57+
python scripts/release/update_release_assets.py \
5858
--head-sha $HEAD_SHA \
5959
--layout scripts/release/release-layout.yml \
6060
--repo "$GITHUB_REPOSITORY" \
6161
--github-token "$GITHUB_REPOSITORY:$GITHUB_TOKEN" "github/codeql-coding-standards-release-engineering:$RELEASE_ENGINEERING_TOKEN" \
62-
--skip-checkrun "release-status" \
63-
--skip-checks
62+
--skip-checkrun "release-status"
6463
6564
-name:Update release notes
6665
env:

‎c/misra/src/rules/RULE-8-2/FunctionTypesNotInPrototypeForm.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ where
4545
msg="Function "+f+" declares parameter that is unnamed."
4646
or
4747
hasZeroParamDecl(f)and
48-
msg="Function "+f+" does notspecifiy void for no parameters present."
48+
msg="Function "+f+" does notspecify void for no parameters present."
4949
or
5050
//parameters declared in declaration list (not in function signature)
5151
//have placeholder file location associated only
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
| test.c:3:6:3:7 | f1 | Function f1 declares parameter that is unnamed. |
2-
| test.c:4:6:4:7 | f2 | Function f2 does notspecifiy void for no parameters present. |
3-
| test.c:5:6:5:7 | f3 | Function f3 does notspecifiy void for no parameters present. |
2+
| test.c:4:6:4:7 | f2 | Function f2 does notspecify void for no parameters present. |
3+
| test.c:5:6:5:7 | f3 | Function f3 does notspecify void for no parameters present. |
44
| test.c:7:5:7:6 | f5 | Function f5 declares parameter in unsupported declaration list. |
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
| test.c:3:6:3:7 | f1 | Function f1 declares parameter that is unnamed. |
2-
| test.c:4:6:4:7 | f2 | Function f2 does notspecifiy void for no parameters present. |
2+
| test.c:4:6:4:7 | f2 | Function f2 does notspecify void for no parameters present. |
33
| test.c:7:5:7:6 | f5 | Function f5 declares parameter in unsupported declaration list. |
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*`A7-1-5` - exclude auto variables initialized with an expression of non-fundamental type. Typically this occurs when using range based for loops with arrays of non-fundamental types. For example:
2+
```
3+
void iterate(Foo values[]) {
4+
for (auto value : values) { // COMPLIANT (previously false positive)
5+
// ...
6+
}
7+
}
8+
```

‎change_notes/2023-10-25-a0-1-1.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*`A0-1-1` - address a number of false positive issues:
2+
* Exclude compiler-generated variables, such as those generated for range-based for loops.
3+
* Exclude variables in uninstantiated templates, for which we have no precise data on uses.
4+
* Deviations should now be applied to the useless assignment instead of the variable itself.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*`A15-4-4`: remove false positives reported on uninsantiated templates.

‎cpp/autosar/src/rules/A0-1-1/UselessAssignment.ql‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ import codingstandards.cpp.deadcode.UselessAssignments
2020

2121
fromSsaDefinitionultimateDef,InterestingStackVariablev
2222
where
23-
notisExcluded(v, DeadCodePackage::uselessAssignmentQuery())and
23+
notisExcluded(ultimateDef, DeadCodePackage::uselessAssignmentQuery())and
2424
isUselessSsaDefinition(ultimateDef,v)
2525
selectultimateDef,"Definition of $@ is unused.",v,v.getName()

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp