docs: add AMD copyright license header to external-facing docs - #65
Conversation
6d1aefd to
54b41a9
Compare
rominf
left a comment
There was a problem hiding this comment.
Request changes: fold Markdown into the single hawkeye config/check, and standardize the header wording repo-wide
Thanks for extending header enforcement to the docs — the goal is right. I'd like to land it as one config driving the existing single hawkeye check, rather than a second config plus a second CI step. Everything below is verified against hawkeye 6.5.1 (the version CI pins).
1. One config, one check
hawkeye applies a single inlineHeader across all file types and picks the comment style per extension, so source and Markdown can share one config and one hawkeye check. Fold the Markdown bits into licenserc.toml:
inlineHeader = """
Copyright © Advanced Micro Devices, Inc., or its affiliates.
SPDX-License-Identifier: MIT
"""
additionalHeaders = ["licenserc-md-header.toml"]
includes = [
"**/*.rs",
"**/*.py",
"**/*.sh",
"**/*.md",
]
excludes = [
"!**/*.md",
"target/**",
".claude/**",
".tmp-*/**",
"third_party/**",
]
[mapping.MARKDOWN_STYLE]
extensions = ["md"]Then:
- delete
licenserc-md.toml; - keep
licenserc-md-header.toml(the custom<!-- -->style definition) — hawkeye rejects an inline[headerStyles]table (unknown field headerStyles), so the companion file is required and is pulled in viaadditionalHeaders; - drop the extra
Check license headers (Markdown)CI step; the existinghawkeye checknow covers everything.
The !**/*.md negation is still required — without it, **/*.md in includes is swallowed by hawkeye's default excludes and nothing gets checked.
2. Standardize the wording repo-wide
A single config has exactly one inlineHeader, and the Markdown wording here (Copyright © …, or its affiliates.) differs from the existing source wording (Copyright Advanced Micro Devices, Inc.). The decision is to adopt the © form everywhere, so re-apply it to the existing source headers:
hawkeye format
This rewrites the .rs/.py/.sh headers in place to match (verified: it replaces the old wording, and hawkeye check then passes for both source and Markdown). It does touch the existing source files — that is intended, so there is one canonical wording across the repo.
3. Heads-up: the directory excludes do not apply to Markdown
!**/*.md is a force-include and overrides the later target/**, .claude/**, .tmp-*/**, third_party/** excludes for .md files (confirmed in either order; even a more specific third_party/**/*.md cannot win against it). It is harmless today — there are no tracked .md files under those paths, and hawkeye's git integration skips untracked dirs — but the day a vendored third_party/*.md lands, CI would demand a copyright header on third-party content. Worth a comment in the config noting the limitation.
Minor
"third_party/**"lost its indentation in thelicenserc-md.tomlexcludes list.- the companion-file comment says "without extra blank lines" but sets
allowBlankLines = true.
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Replace the grep-based Markdown header check with hawkeye, keeping all header enforcement in one tool. Two new config files are needed because hawkeye excludes *.md by default and has no built-in header type for it: - licenserc-md.toml: hawkeye config for Markdown, using a negation rule (!**/*.md) to override the default exclusion and a custom MARKDOWN_STYLE mapping for the .md extension. - licenserc-md-header.toml: defines MARKDOWN_STYLE as an HTML comment block (<!-- ... -->) without extra blank lines, matching our existing headers. The CI step now runs `hawkeye check --config licenserc-md.toml` instead of the 12-line git ls-files + grep loop. Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Signed-off-by: Juho Vainio <juho.vainio@amd.com>
The negation exclude rule (!**/*.md) in licenserc-md.toml overrides any subsequent positive excludes for .md files, so .hawkeye-bin/** in the excludes list had no effect. Adding .hawkeye-bin to .gitignore is cleaner: hawkeye's git integration never enumerates those files. Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Merge licenserc-md.toml into licenserc.toml so one config and one hawkeye check covers all file types. Remove the separate "Check license headers (Markdown)" CI step. The !**/*.md negation override, the MARKDOWN_STYLE mapping, and the additionalHeaders reference are now all in licenserc.toml. Add a comment explaining the force-include limitation: the negation cannot be subsequently re-excluded for a subset of paths, so any tracked *.md file under third_party/ would require a copyright header. Signed-off-by: Juho Vainio <juho.vainio@amd.com>
Apply the © form and ", or its affiliates." suffix to all .rs, .py, and .sh files, matching the wording already used in the Markdown headers. Run with: hawkeye format Signed-off-by: Juho Vainio <juho.vainio@amd.com>
3afc613 to
dd02821
Compare
juhovainio
left a comment
There was a problem hiding this comment.
All addressed — thanks for the thorough review.
- One config, one check: merged
licenserc-md.tomlintolicenserc.toml, deleted the separate file, dropped the second CI step. - Standardized wording: ran
hawkeye formatto rewrite all.rs/.py/.shheaders to the©form. Also picked up 9 new files added by the IA redesign (#62) that landed inmainwhile this PR was in flight. - Negation limitation comment: added to
licenserc.toml. allowBlankLinescomment: fixed inlicenserc-md-header.toml.- Indentation: fixed.
- Conflict: rebased onto
main; the one conflict wastabs/overview.rs(deleted in #62, header-modified here) — resolved by accepting the deletion.
rominf
left a comment
There was a problem hiding this comment.
This is great. Thanks, Juho!
Summary
Files updated
README.md,AGENTS.md,MANIFEST.md,docs/atom.md,docs/automations.md,docs/ci-hardware-testing.md,docs/commit-signatures.md,docs/engine-plugins.md,docs/llm-tool-use.md,docs/manual-testing.md,docs/release-trust.md,docs/sglang.md,docs/testing.md,docs/ux-guidelines.md,docs/vllm.md,docs/wsl.md,skills/rocm-cli-assistant/SKILL.mdMarkdown hawkeye integration notes
Hawkeye excludes
*.mdby default and has no built-in header type for Markdown, so two companion config files were added:licenserc-md.toml— hawkeye config for Markdown, with a!**/*.mdnegation rule to override the default exclusion and aMARKDOWN_STYLEmapping for the.mdextensionlicenserc-md-header.toml— definesMARKDOWN_STYLEas an HTML comment block (<!-- ... -->) without extra blank lines, matching our existing header formatThe CI
license-headersjob now runshawkeye check --config licenserc-md.tomlfor Markdown.