Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion containers/example-app/src/__tests__/server.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import http from 'http';
import http from 'node:http';
import { createRequestHandler, startServer } from '../server';

describe('example-app server', () => {
Expand Down
2 changes: 1 addition & 1 deletion scripts/config/sonar-scanner.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sonar.host.url=https://sonarcloud.io
sonar.qualitygate.wait=true
sonar.sourceEncoding=UTF-8
sonar.sources=.
sonar.exclusions=lambdas/*/src/__tests__/**/*,infrastructure/terraform/bin/terraform.sh
sonar.exclusions=lambdas/*/src/__tests__/**/*,containers/**/src/__tests__,infrastructure/terraform/bin/terraform.sh
sonar.terraform.provider.aws.version=5.54.1
sonar.cpd.exclusions=**.test.*
sonar.coverage.exclusions=tests/, **/*.dev.*, lambdas/**/src/__tests__, utils/utils/src/zod-validators.ts ,**/jest.config.ts,scripts/**/*, containers/**/src/__tests__, eslint.config.mjs, docs/assets/js/nhs-notify.js, containers/example-app/src/server.ts
Expand Down
2 changes: 1 addition & 1 deletion scripts/githooks/check-todos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ function search_todos() {
# If the file is excluded, skip it
if [[ "$skip" = false && -f "$file" ]]; then
file_todos=$(grep -nHiE '\bTODO\b' "$file" || true)
[ -n "$file_todos" ] && todos+="$file_todos\n"
[[ -n "$file_todos" ]] && todos+="$file_todos\n"
fi
done

Expand Down
2 changes: 1 addition & 1 deletion scripts/maintenance/merge.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*******************************************************************************/

const fs = require("fs");
const fs = require("node:fs");

// Read files
const [file1, file2] = process.argv.slice(2);
Expand Down
6 changes: 6 additions & 0 deletions scripts/setup/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ function main() {
cd "$(git rev-parse --show-toplevel)"

run-setup

return 0
}

function run-setup() {
Expand All @@ -23,6 +25,8 @@ function run-setup() {
time make config

check-setup-status

return 0
}

# Check the exit status of tfsec.
Expand All @@ -34,6 +38,8 @@ function check-setup-status() {
echo "Setup was unsuccessful."
exit 1
fi

return 0
}

# ==============================================================================
Expand Down
37 changes: 20 additions & 17 deletions scripts/terraform/trivy-scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,38 @@ function main() {
local dir_to_scan="."

while [[ $# -gt 0 ]]; do
case "$1" in
local current_arg="$1"
case "$current_arg" in
--mode|-m)
if [[ $# -lt 2 ]]; then
echo "Error: --mode requires an argument." >&2
usage
exit 1
fi
scan_mode="$2"
local mode_arg="$2"
scan_mode="$mode_arg"
shift 2
exit 0
;;
--)
shift
break
;;
-*)
;;
usage
exit 1
;;
*)
dir_to_scan="$current_arg"
shift
--help|-h)
usage
exit 0
;;
--)
shift
break
;;
-*)
echo "Unknown option: $1" >&2
usage
exit 1
;;
*)
dir_to_scan="$1"
dir_to_scan="$trailing_arg"
shift
;;
esac
done
local trailing_arg="$1"
dir_to_scan="$trailing_arg"

if [[ $# -gt 0 ]]; then
dir_to_scan="$1"
Expand Down
Loading