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

Run hook on specific directories and files #65

Merged
merged 7 commits into from
Oct 2, 2023

Conversation

klmcadams
Copy link
Contributor

@klmcadams klmcadams commented Sep 29, 2023

  • Run the add-license-headers hook on all python files within directories named src, examples, and tests.
    • Also run the hook on all proto files.
  • Updated README with more regex examples, and how to add files to the .pre-commit-config.yaml files.
  • Included ["non_compliant"]["missing_licenses"]["MIT"] check in the function that finds files that are non-compliant.

Note: the update to check for missing_licenses requires the LICENSES/MIT.txt file to be in the root directory of the repository, otherwise it's not going to work correctly.

Closes #50

@github-actions github-actions bot added the maintenance Package and maintenance related label Sep 29, 2023
@klmcadams klmcadams marked this pull request as draft September 29, 2023 17:48
@klmcadams klmcadams marked this pull request as ready for review September 29, 2023 20:49
Copy link
Member

@RobPasMue RobPasMue left a comment

Choose a reason for hiding this comment

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

Some minor changes - otherwise LGTM!

AUTHORS.md Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
src/ansys/pre_commit_hooks/add_license_headers.py Outdated Show resolved Hide resolved
@klmcadams klmcadams merged commit 75548d9 into main Oct 2, 2023
27 checks passed
@klmcadams klmcadams deleted the maint/specify-file-types branch October 2, 2023 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Package and maintenance related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add default file types to run add-license-headers on
2 participants