Skip to content

Commit fa92a0d

Browse files
authored
[semgrep] Fix multiline commit message, false positive on ipv6 addresses and the name Mary (#27015)
1 parent 32bac1c commit fa92a0d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.github/workflows/semgrep.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Configure
3232
run: |
3333
git config --global --add safe.directory $PWD
34-
echo "COMMIT_MESSAGE='$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }} | sed "s/\"/'/g")'" | tee /dev/stderr >> "$GITHUB_ENV"
34+
echo "COMMIT_MESSAGE='$(git log --format=%B -n 1 ${{ github.event.pull_request.head.sha }} | sed "s/\"/'/g" | tr "\n" " ") '" | tee /dev/stderr >> "$GITHUB_ENV"
3535
echo "(if the last commit message contains '[skip style guide checks]' Semgrep style guide rule checks will be skipped)"
3636
3737
# Semgrep CI to run on Schedule (Cron) or Manual Dispatch

.semgrep/style-guide-dates-in-docs.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ rules:
3737
- "/.semgrep/**"
3838
- "/.github/**"
3939
patterns:
40-
- pattern-regex: "Jan|Feb|Mar[^k]|Apr|May[^b]|Jun[^k]|Jul|Aug|Sep|Nov|Dec[^i]"
40+
- pattern-regex: "Jan|Feb|Mar[ c]|Apr|May[ \\.]|Jun[ e]|Jul|Aug|Sep|Nov|Dec[ e]"
4141

4242
- id: style-guide-potential-date-year
4343
languages: [generic]
@@ -58,4 +58,5 @@ rules:
5858
- "/.github/**"
5959
patterns:
6060
# ignore 2xxx- with a - at the end (double-escape because in string and not a range operator!)
61-
- pattern-regex: "20[0-9][0-9][^\\-]"
61+
# ignore 200!:: as part of IPv6 address
62+
- pattern-regex: "20[0-9][0-9][^\\-:]"

0 commit comments

Comments
 (0)