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

New rule: Consistent Line Endings #294

Open
paulo-ferraz-oliveira opened this issue Mar 1, 2023 · 0 comments
Open

New rule: Consistent Line Endings #294

paulo-ferraz-oliveira opened this issue Mar 1, 2023 · 0 comments
Labels
Milestone

Comments

@paulo-ferraz-oliveira
Copy link
Collaborator

paulo-ferraz-oliveira commented Mar 1, 2023

Name

consistent_line_endings

Brief Description

Windows and Linux/macOS systems use different line-endings in files.

It seems like a good idea not to mix these in the same codebase.

Options

force - Force a choice, values can be unix or windows.

Reasoning

While this is not necessarily a concern for the correctness of your code, you should use a consistent style throughout your codebase.

Note: If you're using a formatter, this should already be taken into account by it.

Refactoring Proposal

elvis should warn about where differences are found (if no force consider the first occurrence as "the standard") and throw an error per file alone, not one per line.

Origin (#281)

Inspired by Credo's https://hexdocs.pm/credo/Credo.Check.Consistency.LineEndings.html.

@paulo-ferraz-oliveira paulo-ferraz-oliveira changed the title Consistent Line Endings New rule: Consistent Line Endings Mar 1, 2023
@elbrujohalcon elbrujohalcon added this to the 3.1.0 milestone Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants