-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
fix r cmd check note about #! interpreter line #83
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is good, but does anything that was grepping for "do not edit this file" foolishly assume that such a line could only appear at the top of the file?
Hmm, that's definitely something we could have foolishly done but I don't actually think we are grepping for that anywhere. I may have missed it though. Where would we need to do that? |
There are various functions somewhere that check for that line and if it
doesn't exist then they throw a warning but don't overwrite the file.
…On Wed, Dec 2, 2020 at 1:01 PM Jonah Gabry ***@***.***> wrote:
Hmm, that's definitely something we could have foolishly done but I don't
actually think we are grepping for that anywhere. I may have missed it
though. Where would we need to do that?
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#83 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZ2XKSFMNARYGI3U72XROTSSZ6I3ANCNFSM4UKYEMIQ>
.
|
Ah ok yeah. I'll check on that. |
@bgoodri You were right. In two places I just changed: readLines(dest_file, n = 1) == noedit_msg to noedit_msg %in% readLines(dest_file, n = 5) |
The proposed fix should be fine. I'm pretty sure I was just checking the first line each time. More long-term, the current First of all, A second less important issue is that it's cumbersome to change the structure of the package based on whether or not What I was thinking instead was to create a hook to run |
@mlysy Thanks, yeah I think changing the auto_config mechanism like sounds good if you want to try that out. |
Fixes #82.
Checks if first line is #! interpreter line and if so puts the "don't edit by hand" message on the second line instead of the first. This avoids the new r cmd check note reported in #82.