cli icon indicating copy to clipboard operation
cli copied to clipboard

No newline at end of file

Open friederbluemle opened this issue 6 years ago • 5 comments

What you are doing?

I use the sequelize command to generate models and migrations, for example:

sequelize model:create --name User --attributes name:string,state:boolean,birth:date,card:integer,role:enum:'{Admin,Guest}'

What do you expect to happen?

The generated text files do not contain whitespace errors and are well formed.

What is actually happening?

The generated files are missing the newline at EOF. This causes warnings with Git:

No newline at end of file

It might also cause unintended file changes with some editors (e.g. vim) that automatically insert a missing EOF newline character.

Dialect: mysql / postgres / sqlite / mssql / any Database version: n/a Sequelize CLI version: 5.4.0 Sequelize version: 4.43.0

friederbluemle avatar Mar 05 '19 08:03 friederbluemle

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 21 '20 19:06 stale[bot]

This is still an issue, both with sequelize-cli 5.5.1 and 6.0.0-beta.3.

friederbluemle avatar Jun 21 '20 21:06 friederbluemle

I believe this is fixed, if not please let me know. I will close this issue after a few weeks.

WikiRik avatar Nov 29 '21 10:11 WikiRik

Hi @WikiRik - Thanks for the update. I just tested again (using 6.3.0), and unfortunately the files are still generated with newline missing on the last line.

friederbluemle avatar Dec 31 '21 03:12 friederbluemle

Hi @WikiRik - Thanks for the update. I just tested again (using 6.3.0), and unfortunately the files are still generated with newline missing on the last line.

Ah yes, upon generation it removes all empty lines while they are compiled correctly in the assets folder. I will take a look at this later

WikiRik avatar Jan 11 '22 16:01 WikiRik