Skip to content

Conversation

@aleclorimer
Copy link
Contributor

@aleclorimer aleclorimer commented Dec 2, 2025

Description of Change

Created a script to check all staged lua files that they end with a newline character and begin with the current year's copyright header. This file should be made executable and copied to .git/hooks/pre-commit.

Type of Change

  • Bug fix
  • New feature
  • Refactor

tools/pre-commit Outdated
Comment on lines 8 to 9
# - Copy to .git/hooks/pre-commit
# - Ensure executable
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest just making sure this is committed as executable to avoid the hassle.

Also I would suggest to use a softlink instead of copying, so that you don't need to re-copy it later (ln -s ../../tools/pre-commit .git/hooks/pre-commit (use a relative link so you can move the directory later)).

# pre-commit
#
# - Soft link into .git/hooks/pre-commit
# - $ ln -s tools/pre-commit .git/hooks/pre-commit
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe it's different with your version of ln, but usually the first argument is assigned to the symlink verbatim, rather than computed from where you invoked the command. So, it should be ../../tools/pre-commit.

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 this pull request may close these issues.

5 participants