Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detect missing copyright and license comments in Python and PowerShell files #766

Open
romank-msft opened this issue Feb 3, 2025 · 2 comments · May be fixed by #769
Open

Detect missing copyright and license comments in Python and PowerShell files #766

romank-msft opened this issue Feb 3, 2025 · 2 comments · May be fixed by #769
Assignees

Comments

@romank-msft
Copy link
Contributor

That is to prevent issues like #765

@romank-msft romank-msft changed the title Detect missing copyright and license comments on Python and PowerShell files Detect missing copyright and license comments in Python and PowerShell files Feb 3, 2025
@romank-msft romank-msft self-assigned this Feb 3, 2025
@daprilik
Copy link
Contributor

daprilik commented Feb 3, 2025

As mentioned on #765 (comment), this has the potential to be a one-line change (just add these file-kinds to the existing match statements in xtask/src/tasks/fmt/house_rules/copyright.rs).

The one place it might be a bit annoying is if you want to maintain the shebang at the top of the .py files. I'm not sure the current lint handles that case gracefully, so if those need to be preserved, you might need to write a bit more Rust code in the xtask lint.

romank-msft added a commit to romank-msft/openvmm that referenced this issue Feb 3, 2025
Few files turned out to not have the notes, and they were fixed
manually.
Provide a robust solution by updating house rules in xtask.

Suggested-by: Daniel Prilik  <[email protected]>
Reported-by: Matt Kurjanowicz <[email protected]>
Fixes: microsoft#766
@romank-msft
Copy link
Contributor Author

Thanks @daprilik, raised a PR!

romank-msft added a commit to romank-msft/openvmm that referenced this issue Feb 6, 2025
Few files turned out to not have the notes, and they were fixed
manually.
Provide a robust solution by updating house rules in xtask.

Additionally this includes an updatex for the automatic fix
mode. I made sure that produces desired results and is
idempotent

Suggested-by: Daniel Prilik  <[email protected]>
Reported-by: Matt Kurjanowicz <[email protected]>
Fixes: microsoft#766
romank-msft added a commit to romank-msft/openvmm that referenced this issue Feb 6, 2025
Few files turned out to not have the notes, and they were fixed
manually.
Provide a robust solution by updating house rules in xtask.

Additionally this includes an updatex for the automatic fix
mode. I made sure that produces desired results and is
idempotent

Suggested-by: Daniel Prilik  <[email protected]>
Reported-by: Matt Kurjanowicz <[email protected]>
Fixes: microsoft#766
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants