Skip to content

Commit 9405bf4

Browse files
christiangdaclaude
andauthored
feat: concurrent Windows collection, platform tests, and CLI improvements (#10)
* feat: sign distribution binary * feat: add distribution .pkg with Apache 2.0 license and installer UI - Add installer resources (welcome.html, readme.html, license.html) - Convert Apache 2.0 LICENSE to HTML for macOS Installer.app display - Add Distribution XML for productbuild with Welcome, Read Me, and License Agreement screens - Update Makefile build-dist-pkg to use pkgbuild + productbuild - Users see install location, usage examples, uninstall instructions, and must agree to Apache 2.0 license before installing Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: add installer resources for macOS .pkg distribution - Add Welcome, Read Me, License (Apache 2.0), and Distribution XML - Fix .gitignore: scope 'machineid' rule to root only so installer/ macos/machineid/ directory is not ignored Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: make test * feat: concurrent Windows collection, platform tests, and CLI improvements - Rewrite Windows collectIdentifiers to run all hardware queries concurrently using goroutines, reducing ID generation from ~8-12s to ~2-3s by parallelizing slow wmic/PowerShell calls. - Add comprehensive platform-specific test files: windows_test.go (50+ tests covering parsing, fallback, concurrent collection, diagnostics) and linux_test.go (25+ tests covering parsing, validation, file reading, mock executor integration). - Add platform-specific example files for Windows and Linux with testable examples for diagnostics, integrity, and platform notes. - Improve CLI help: grouped flags by category, documented default behavior and exit codes, cleaner version output with aligned key-value pairs, rename -version.long to -version-long, include salt in JSON output. - Fix all golangci-lint errors across darwin/linux/windows: add proper error checking in tests, nolint annotations for example functions, apply De Morgan's law fix. - Update doc.go and README.md with concurrent Windows collection details and revised CLI documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: handle redirect in Makefile command wrapper when MAKE_STOP_ON_ERRORS is true Avoid double stdout redirection when the command already contains a redirect (e.g. `> file`). Uses $(findstring) to detect existing redirects and only adds `2>/dev/null` in that case. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chrore: update instructions --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e85406c commit 9405bf4

28 files changed

Lines changed: 2714 additions & 269 deletions

.github/copilot-instructions.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,15 @@ Since this is a library build in native go, the files are mostly organized follo
4949
- Document all exported functions, types, and variables with clear and concise comments.
5050
- Use examples in the documentation to illustrate how to use the library effectively.
5151
- Keep documentation up to date with code changes. The package documentation located at `doc.go` should provide an overview of the package and its main functionalities. and the Public documentation at `README.md` should provide an overview of the project, installation instructions, usage examples, and other relevant information.
52+
53+
## Post-Change Checklist
54+
55+
Prefer the Make targets that the repo already defines after making changes:
56+
57+
```bash
58+
make go-fmt # Format code
59+
make go-betteralign # Align struct fields for optimal memory layout
60+
golangci-lint run ./... # Run linter (also checks formatting, vet, and other issues)
61+
make build # Verify build
62+
make test # Run tests
63+
```

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
pull-requests: read
1111

1212
jobs:
13-
build:
13+
test:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- name: Checkout
@@ -94,7 +94,7 @@ jobs:
9494
run: |
9595
echo "### Test report" >> $GITHUB_STEP_SUMMARY
9696
97-
go test -race -coverprofile=coverage.txt -covermode=atomic -tags=unit ./... | tee -a $GITHUB_STEP_SUMMARY
97+
make test | tee -a $GITHUB_STEP_SUMMARY
9898
echo "" >> $GITHUB_STEP_SUMMARY
9999
100100
- name: Test coverage

0 commit comments

Comments
 (0)