faas-cli icon indicating copy to clipboard operation
faas-cli copied to clipboard

Fixes #852 optionally add last newline

Open kylos101 opened this issue 2 years ago • 3 comments

Description

Fixes #852

Motivation and Context

  • [x] I have raised an issue to propose this change (required)

How Has This Been Tested?

So far, just manually, but will write unit tests after getting feedback on the fix. Tested using the stack.yml file in this repo, ran iterations where it did not have trailing new lines, and did - both behave the same now.

Testing was done on Ubuntu; no Windows testing has been done yet.

I intentionally do this check early, in the same block as the other append checks, so that if we encounter an error while trying to fix the trailing new lines, we do not leave behind a handler folder.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I've read the CONTRIBUTION guide
  • [x] I have signed-off my commits with git commit -s (no, but I will, I look forward to Derek telling me abou tthis) :+1:
  • [x] I have added tests to cover my changes. (not yet, I plan to, but first want to get feedback on my fix) :+1:
  • [x] All new and existing tests passed.

kylos101 avatar Nov 07 '21 16:11 kylos101

Thank you for your contribution. unfortunately, one or more of your commits are missing the required "Signed-off-by:" statement. Signing off is part of the Developer Certificate of Origin (DCO) which is used by this project.

Read the DCO and project contributing guide carefully, and amend your commits using the git CLI. Note that this does not require any cryptography, keys or special steps to be taken.

:bulb: Shall we fix this?

This will only take a few moments.

First, clone your fork and checkout this branch using the git CLI.

Next, set up your real name and email address:

git config --global user.name "Your Full Name" git config --global user.email "[email protected]"

Finally, run one of these commands to add the "Signed-off-by" line to your commits.

If you only have one commit so far then run: git commit --amend --signoff and then git push --force. If you have multiple commits, watch this video.

Check that the message has been added properly by running "git log".

derek[bot] avatar Nov 07 '21 16:11 derek[bot]

@alexellis take a peek and let me know what you think? Once I have your :+1: on the fix itself, I'll proceed with unit tests. Thanks!

kylos101 avatar Nov 07 '21 16:11 kylos101

Hi @alexellis this should ready for review now (no rush, just whenever you get a chance).

FYI, while testing I found this issue #906 , let me know if you'd like me to draft a fix in a separate PR?

kylos101 avatar Nov 21 '21 14:11 kylos101