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

[FEATURE] Add a new-line linter in the current CI workflow #46

Closed
owaiskazi19 opened this issue Jul 12, 2022 · 2 comments
Closed

[FEATURE] Add a new-line linter in the current CI workflow #46

owaiskazi19 opened this issue Jul 12, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers untriaged

Comments

@owaiskazi19
Copy link
Member

Is your feature request related to a problem?

Coming from opensearch-project/OpenSearch#2857. Add a new-line linter to make sure all files end with a single newline. This is a POSIX standard, read more https://stackoverflow.com/questions/729692/why-should-text-files-end-with-a-newline

What solution would you like?

Can use https://github.com/fernandrone/linelint/releases for the workflow.

What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?

Add any other context or screenshots about the feature request here.

@dbwiddis
Copy link
Member

This is trivially fixed by adding endWithNewline() to the formatting.gradle file (probably right after trimTrailingWhitespace())

@dbwiddis
Copy link
Member

dbwiddis commented Aug 3, 2022

I don't like that the linter complains about it but doesn't fix it. Adding the line to spotless as suggested above would fix it (and also fail it on spotless check but with a more helpful message how to fix!)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers untriaged
Projects
None yet
Development

No branches or pull requests

2 participants