Skip to content

Conversation

@jangorecki
Copy link
Member

…to it, as that would result in build failure

follow up of comments in 9acf6d9#comments

…to it, as that would result in build failure
@jangorecki jangorecki added the ci label Oct 31, 2022
jangorecki referenced this pull request Oct 31, 2022
…at the bottom while all other fields are easy to see straight away at the top
@codecov
Copy link

codecov bot commented Oct 31, 2022

Codecov Report

Merging #5508 (9950d22) into master (9acf6d9) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #5508   +/-   ##
=======================================
  Coverage   99.51%   99.51%           
=======================================
  Files          80       80           
  Lines       14774    14774           
=======================================
  Hits        14702    14702           
  Misses         72       72           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

.gitlab-ci.yml Outdated
before_script:
- Rscript -e 'install.packages(c("knitr","rmarkdown"), repos=file.path("file:",normalizePath("bus/mirror-packages/cran")), quiet=TRUE)'
- rm -r bus
- sed -i '${/^$/d;}' ./DESCRIPTION ## remove last empty line in DCF
Copy link
Member

Choose a reason for hiding this comment

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

An "empty line" to me means \n\n at the end. Just having a \n at the end of the last line is just a normal line ending, not an empty line being creating.

So, to be absolutely clear, suggest comment be :

make last line end abruptly; i.e. without a final \n

Further, I tested it, and if the file ends with \n[ ]+ then the last empty line is not removed.
And if there are 2 or more \n at the end, only 1 is removed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Further, I tested it, and if the file ends with \n[ ]+ then the last empty line is not removed.
And if there are 2 or more \n at the end, only 1 is removed.

I think those two are clear issues that we should not auto-fix in CI.

Copy link
Member

Choose a reason for hiding this comment

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

R CMD build has no problem with spaces or newlines at the end so why do you view these as an issue at all, let alone a clear issue?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because they serve no purpose. Last new line has no purpose as well, but it is easier to be added during editing DCF. Although now, after your change of closing brackets of authors being in the last line, I think we could skip sed in my PR altogether, as the last line will not have to be edited anymore.

Copy link
Member

Choose a reason for hiding this comment

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

Because they serve no purpose is a reason not to let them get in the way again in future. That is the goal here: to prevent the same problem happening again. The GLCI script is the one applying the >> operation to DESCRIPTION, so that is what should prepare for that operation the best it can. It's that simple. So that we don't have the same problem again in future.

I will change it to do what I asked, merge and move on.

@mattdowle mattdowle merged commit cd02c08 into master Nov 1, 2022
@mattdowle mattdowle deleted the dcf-clean-last-empty-line branch November 1, 2022 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants