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

Missing trailing newline at the end of files causes warning #506

Open
apirogov opened this issue Aug 29, 2023 · 1 comment
Open

Missing trailing newline at the end of files causes warning #506

apirogov opened this issue Aug 29, 2023 · 1 comment
Labels
frequency: low indicator that a use-case has a low-frequency in lessons nice to have A new feature that would be nice to have, but is not currently a priority

Comments

@apirogov
Copy link

Currently, if you do not have an empty line at the end of a file, it produces warnings such as:

Warnmeldungen:
1: In readLines(path, encoding = encoding) :
  unvollständige letzte Zeile in '/local/home/a.pirogov/projects/ias9/scientific-metadata/instructors/instructor-notes.md' gefunden
2: In readLines(path, encoding = encoding) :
  unvollständige letzte Zeile in '/local/home/a.pirogov/projects/ias9/scientific-metadata/instructors/meet-the-creators.Rmd' gefunden
3: In readLines(path, encoding = encoding) :
  unvollständige letzte Zeile in '/local/home/a.pirogov/projects/ias9/scientific-metadata/learners/meet-the-creators.Rmd' gefunden

(it says "incomplete last line" in some file....)

I don't think that not having an empty line at the end of files should be something triggering a warning.

Using sandpaper (0.12.4), pegboard (0.5.3), and varnish (0.2.18).

@zkamvar zkamvar added nice to have A new feature that would be nice to have, but is not currently a priority frequency: low indicator that a use-case has a low-frequency in lessons labels Aug 29, 2023
@zkamvar
Copy link
Contributor

zkamvar commented Aug 29, 2023

Thank you for the report. This is the default behaviour of R's readLines() function: https://stat.ethz.ch/R-manual/R-devel/library/base/html/readLines.html

There are many places this can occur within {sandpaper} (possibly in {pegboard} or {tinkr}). I will see if I can track it down and provide warn = FALSE in those functions when I have time.

That being said, I'm hesitant to label it as a bug because a warning doesn't impede the functionality of The Workbench.

@apirogov apirogov changed the title Bug: Missing trailing newline at the end of files causes warning Missing trailing newline at the end of files causes warning Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frequency: low indicator that a use-case has a low-frequency in lessons nice to have A new feature that would be nice to have, but is not currently a priority
Projects
None yet
Development

No branches or pull requests

2 participants