Skip to content
New issue

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

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

Already on GitHub? # to your account

Replace GNU-specific commands with more portable alternatives #682

Merged
merged 4 commits into from
Mar 5, 2024

Conversation

jw013
Copy link
Contributor

@jw013 jw013 commented Mar 4, 2024

#680 enhancements

The replacement commands are functionally equivalent with one exception: new lints are now added to the beginning of the add_lint!() macro instead of the end. (There is a way to append but would require a slightly more complex awk command). More details in the commit messages.

jw013 added 3 commits March 3, 2024 19:12
- Replace grep -z (GNU-only) with an equivalent awk invocation.
- Replace sed -i (option behaves differently on Mac vs GNU) with tmpfile
- Replace sed -z (GNU-only). New lints are prepended instead of appended
The contributor-facing scripts (make_new_lint, make_test_crate,
regenerate_test_rustdocs) no longer have any dependencies on GNU-only
command line tools, so those have been removed from the guide.
Copy link
Owner

@obi1kenobi obi1kenobi left a comment

Choose a reason for hiding this comment

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

Awesome, thanks so much for putting this together! 🚀

@obi1kenobi obi1kenobi enabled auto-merge (squash) March 5, 2024 00:39
@obi1kenobi obi1kenobi merged commit e0d61c7 into obi1kenobi:main Mar 5, 2024
33 checks passed
@jw013 jw013 deleted the gnu-compat branch March 6, 2024 13:49
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants