Skip to content

Conversation

silverjam
Copy link
Contributor

@silverjam silverjam commented Apr 15, 2021

Python (hopefully cross platform) solution for fixing up trailing newlines.

If there are trailing newlines, running cargo make newline-check you'll see:

... cargo make output ...
*********************************************
*** ERROR: files missing trailing newline ***
*********************************************
.gitattributes
*********************************************
... cargo make output ...

Then you can run cargo make newline-format to fix.

Copy link
Contributor

@jayvdb jayvdb left a comment

Choose a reason for hiding this comment

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

it looks like perl but worth merging to keep as an example of what is possible.
I wonder if cargo-make author might be interested in adding stuff to duckscript sdk to make this easy.

@silverjam silverjam merged commit a9b6175 into john-michaelburke/PR29-extras Apr 15, 2021
@silverjam silverjam deleted the silverjam/newline-terminator branch April 15, 2021 06:19
john-michaelburke added a commit that referenced this pull request Apr 15, 2021
* john-michaelburke/PR29-extras

* Added a command to check/fix newline for specific file types.

* python trailing newlne linter/formatter (#31)

* python trailing newlne linter/formatter

* fix-up

* private = true

* remove newline check

* remove linelint config

* Respond to review requests.

* Fix GAL_E8 strings.

Co-authored-by: Jason Mobarak <[email protected]>
Co-authored-by: Jason Mobarak <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants