Skip to content

Commit 209756c

Browse files
tas50claude
andauthored
🧹 Add copyright header and new provider checklist to CLAUDE.md (#7147)
* 📄 Add copyright header and new provider checklist to CLAUDE.md Document the required copyright/license header format and the files that must be updated when adding a new provider. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * Ignore claude readme for copyrights Signed-off-by: Tim Smith <tsmith84@gmail.com> --------- Signed-off-by: Tim Smith <tsmith84@gmail.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 267bcb5 commit 209756c

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

.copywrite.hcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ project {
1515
"**/*_string.go",
1616
".git/**",
1717
"providers-sdk/v1/mqlr/lrcore/lr_test.go",
18+
"CLAUDE.md",
1819
]
1920
}

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,14 @@ When developing mql alongside cnspec, create a `go.work` in a parent directory w
402402

403403
## 7. Important Implementation Details
404404

405+
### Copyright & License Headers
406+
Every source file (`.go`, `.lr`, `.proto`, etc.) must begin with:
407+
```
408+
// Copyright Mondoo, Inc. 2024, <current year>
409+
// SPDX-License-Identifier: BUSL-1.1
410+
```
411+
The format is `2024, <current year>` (comma-separated, not a dash). The first year (2024) is fixed; the second year should be the current calendar year. This is enforced by the `copywrite` tool installed via `make prep/tools`.
412+
405413
### Provider Connection Management
406414
- Implement proper connection lifecycle: `Connect()`, `GetData()`, `StoreData()`, `Disconnect()`
407415
- Handle authentication failures gracefully with `Is400AccessDeniedError()` checks
@@ -494,6 +502,12 @@ Each provider follows a standard directory layout:
494502
- **`main.go`** - Provider binary entry point
495503
- **`gen/main.go`** - Generates CLI configuration JSON
496504
505+
When adding a new provider, you must also register it in these files:
506+
- **`providers/defaults.go`** — Add a default entry (alphabetically) so the CLI discovers the provider before it's installed
507+
- **`README.md`** — Add a row to the provider table (alphabetically)
508+
- **`DEVELOPMENT.md`** — Add the provider path to the `go.work` provider list (alphabetically)
509+
- **`Makefile`** — Add the provider name to the `PROVIDERS` list (alphabetically)
510+
497511
### CLI and Output
498512
Key directories for user-facing functionality:
499513
- **`apps/mql/cmd/`** - CLI command implementations

0 commit comments

Comments
 (0)