mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-09-11 18:29:22 -07:00
Resolve github codepilot recommendations
* Shell script NOT updated to use an atomic rename after writing to temp file. Don't commit if it's not right. * Shell script `set -e` is now `set -euo pipefail` * Shell script uses short-form options for `sort` * Three typos fixed in markdown * .gitignore updated to ignore codeql trash
This commit is contained in:
@@ -114,3 +114,8 @@ fpga_version_info.c
|
||||
|
||||
# docs
|
||||
!doc/*.json
|
||||
|
||||
# codeql
|
||||
codeql/
|
||||
_codeql_detected_source_root
|
||||
|
||||
|
||||
+3
-3
@@ -32,7 +32,7 @@ it was matching against ANY of the (potentially many) lines in the commit messag
|
||||
|
||||
## Fixup how to get the commits of interest....
|
||||
|
||||
My goal was to match only when the **entire** commit message begans with the pattern.
|
||||
My goal was to match only when the **entire** commit message begins with the pattern.
|
||||
For some patterns, I wanted to match against the entire multi-line message.
|
||||
|
||||
This seemed like something designed for `awk`, and `git log --format=...` allows
|
||||
@@ -100,7 +100,7 @@ character, but continues to split the fields with `[ \t\n]+` (default field sepa
|
||||
|
||||
Maybe change each record to be of the form:
|
||||
|
||||
`([0-9a-fA-F]{39})\x00([^\x00]*)\x00`, which means that
|
||||
`([0-9a-fA-F]{40})\x00([^\x00]*)\x00`, which means that
|
||||
`$1` == commit hash, and
|
||||
`$2` == message body.
|
||||
|
||||
@@ -324,7 +324,7 @@ clear; git log --format='%H%n%B%x00' | awk -v RS='\0' '
|
||||
do_print = 0
|
||||
any_match = 0
|
||||
|
||||
# message ... remove trailing whitepace and blank lines
|
||||
# message ... remove trailing whitespace and blank lines
|
||||
msg = matches[2]
|
||||
sub(/( *(\r?\n))+$/, "", msg)
|
||||
|
||||
|
||||
+3
-2
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -euo pipefail
|
||||
|
||||
git log --format='%H%n%B%x00' | awk -v RS='\0' '
|
||||
BEGIN {
|
||||
@@ -29,4 +29,5 @@ git log --format='%H%n%B%x00' | awk -v RS='\0' '
|
||||
print matches[1]
|
||||
}
|
||||
}
|
||||
' | sort --unique --ignore-case > .git-blame-ignore-revs
|
||||
' | sort -u -f > .git-blame-ignore-revs
|
||||
|
||||
|
||||
Reference in New Issue
Block a user