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
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
.cursor/rules/*
.cursor/rules/*

# Claude Code - we beleive engineers are responsible for the code they push no matter how it's generated.
# Therefore, configs specific to their coding practices are their responsibilty to judiciously manage.
.claude/*

12 changes: 8 additions & 4 deletions lib/os-modules/Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ vars:
terraform-aws-ssm-agent \
terraform-aws-tailscale \
terraform-datadog-users \
terraform-github-teams \
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ordering modules in a-z order

terraform-github-organization \
terraform-github-teams \
terraform-googleworkspace-users-groups-automation \
terraform-postgres-config-dbs-users-roles \
terraform-secrets-helper \
Expand All @@ -32,12 +32,16 @@ tasks:
vars:
MODULES: "{{if .CLI_ARGS}}{{.CLI_ARGS}}{{else}}{{.DEFAULT_MODULES}}{{end}}"
FILES: >-
.github
.trunk
.checkov.yaml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added and ordering a-z

.coderabbit.yaml
.editorconfig
.gitignore
.github
.markdownlint.yaml
.terraform-docs.yaml
.tflint.hcl
.trunk
.yamllint.yaml
LICENSE
aqua.yaml
cmds:
Expand All @@ -46,7 +50,7 @@ tasks:
modules=$(echo "{{.MODULES}}" | tr '\n' ' ' | sed 's/\\//g')
for module in $modules
do
echo "Syncing files to ../$module..."
echo "Syncing files to ../$module ..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Harden the sync script with strict error handling

Add set -euo pipefail at the top of the sync task’s inline script so that any error aborts the task immediately:

     cmds:
-      - |
+      - |
+        set -euo pipefail
         # Convert newlines to spaces and remove backslashes
         modules=$(echo "{{.MODULES}}" | tr '\n' ' ' | sed 's/\\//g')
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
echo "Syncing files to ../$module ..."
cmds:
- |
set -euo pipefail
# Convert newlines to spaces and remove backslashes
modules=$(echo "{{.MODULES}}" | tr '\n' ' ' | sed 's/\\//g')
🤖 Prompt for AI Agents
In lib/os-modules/Taskfile.yaml at line 42, the sync task's inline script lacks
strict error handling. Add the line `set -euo pipefail` at the very beginning of
the script to ensure the task aborts immediately on any error, undefined
variable, or failed pipeline command.

for file in {{.FILES}}
do
echo " Syncing $file"
Expand Down