-
-
Notifications
You must be signed in to change notification settings - Fork 23
feat: Add .editorconfig for consistent formatting #324
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # .editorconfig for the Exercism AWK track repository | ||
| # https://spec.editorconfig.org/ | ||
|
|
||
| # Top-most EditorConfig file | ||
| # A best practice to prevent settings from parent directories from interfering. | ||
| root = true | ||
|
|
||
| # Universal settings for all files. These are the baseline rules. | ||
| [*] | ||
|
|
||
| # Sets the character set to UTF-8, the universal standard for text files. | ||
| charset = utf-8 | ||
|
|
||
| # Enforces Unix-style line endings (LF) | ||
| end_of_line = lf | ||
|
|
||
| # Ensures files are POSIX-compliant and prevents issues with some command-line tools. | ||
| insert_final_newline = true | ||
|
|
||
| # Keeps the codebase clean and avoids noise in diffs. | ||
| trim_trailing_whitespace = true | ||
|
|
||
| # Specifies the language for the IDE's spell checker. | ||
| spelling_language = en-US | ||
|
|
||
|
|
||
| # Settings for files we edit, overriding universal settings where needed. | ||
|
|
||
| # AWK solution/example files use 4-space indentation. | ||
| # max_line_length is unset here because some files contain very long | ||
| # lines with embedded data, making a fixed line length impractical. | ||
| [*.awk] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| max_line_length = unset | ||
|
|
||
| # BATS test files use 4-space indentation. | ||
| # max_line_length is unset here because some test files contain very long | ||
| # lines with embedded data, making a fixed line length impractical. | ||
| [*.bats] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| max_line_length = unset | ||
|
|
||
| # For Markdown files, specific settings are needed to preserve formatting. | ||
| [*.md] | ||
| # Disable trimming trailing whitespace, as two spaces can create a hard line break. | ||
| trim_trailing_whitespace = false | ||
| max_line_length = unset | ||
|
|
||
| # Override for common data and config formats to use 2-space indentation | ||
| # and disable line length checks, as they often contain long strings. | ||
| [*.{json,yml,yaml,xml}] | ||
| indent_size = 2 | ||
| indent_style = space | ||
| max_line_length = unset | ||
|
|
||
| # This is an auto-generated file. | ||
| [tests.toml] | ||
| indent_size = unset | ||
| indent_style = unset | ||
|
|
||
| # Shell scripts in the bin directory are hand-written, so a line length | ||
| # limit improves readability. | ||
| [bin/*] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| max_line_length = 120 | ||
|
|
||
| # This file is a copy of the | ||
| # https://github.com/exercism/configlet/blob/main/scripts/fetch-configlet file. | ||
| [bin/fetch-configlet*] | ||
| indent_size = unset | ||
| indent_style = unset | ||
|
|
||
| # The formatting of a LICENSE file is often fixed and should not be altered. | ||
| # Unsetting these rules prevents the editor from modifying it. | ||
| [LICENSE] | ||
| indent_size = unset | ||
| indent_style = unset | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.