Skip to content

Commit

Permalink
Polish various files to quiet linter
Browse files Browse the repository at this point in the history
  • Loading branch information
bpmooch committed Aug 1, 2024
1 parent cc1d700 commit ced6c32
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 79 deletions.
Empty file modified hack/certgen
100644 → 100755
Empty file.
71 changes: 0 additions & 71 deletions hack/headers-check

This file was deleted.

12 changes: 5 additions & 7 deletions hack/headers-strip
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
function info() {
green=''
nc=''
printf "${green}%s${nc}
" "$1"
printf "${green}%s${nc}\n" "$1"
}

# This script assumes running from the top level directory within a Makefile
Expand Down Expand Up @@ -51,21 +50,20 @@ function strip_script_header() {
# account for scripts with shebangs
if [ "$FIRST_LINE" = '#!/usr/bin/env bash' ]; then
HEADER_LINES=30
expected=$(printf "%s
%s" '#!/usr/bin/env bash' "$expected")
expected=$(printf "%s\n%s" '#!/usr/bin/env bash' "$expected")
else
HEADER_LINES=29
fi
FILE_HEADER=$(head -n "$HEADER_LINES" "$file")
if [ "$FILE_HEADER" = "$expected" ]; then
info " -> [MUTATING SOURCE FILE] Stripping header: $file"
# strip the header from the source
tail -n +$((HEADER_LINES + 1)) "$file" > "${file}.tmp" && mv "${file}.tmp" "$file"
tail -n +$((HEADER_LINES + 1)) "$file" > "${file}.tmp" \
&& mv "${file}.tmp" "$file"
if [ "$HEADER_LINES" -eq 30 ]; then
# readd shebang
SRC=$(cat "$file")
echo -e "#!/usr/bin/env bash
$SRC" > "${file}.tmp" && mv "${file}.tmp" "$file"
printf "%s\n%s" "#!/usr/bin/env bash" "$SRC" > "$file"
fi
else
info " -> [SKIPPING SOURCE FILE] $file"
Expand Down
3 changes: 2 additions & 1 deletion proto/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#![allow(clippy::derive_partial_eq_without_eq)]
#![allow(clippy::empty_docs)]
#![allow(clippy::match_single_binding)]
#![allow(clippy::doc_lazy_continuation)]

pub mod cells {
include!("../gen/aurae.cells.v0.rs");
Expand All @@ -43,4 +44,4 @@ pub mod observe {

pub mod vms {
include!("../gen/aurae.vms.v0.rs");
}
}

0 comments on commit ced6c32

Please sign in to comment.