<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ configuring settings - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ configuring settings - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 18 May 2026 10:48:03 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/tag/configuring-settings/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ git config – How to Configure Git Settings to Improve Your Development Workflow ]]>
                </title>
                <description>
                    <![CDATA[ By Dillion Megida git config is a powerful command in Git. You can use the Git configuration file to customize how Git works.  This file exists in the project level where Git is initialized (/project/.git/config) or at the root level (~/.gitconfig). ... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/git-config-how-to-configure-git-settings/</link>
                <guid isPermaLink="false">66d84efa29e30bc0ad47756d</guid>
                
                    <category>
                        <![CDATA[ configuring settings ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Git ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 09 Mar 2022 19:14:42 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2022/03/pexels-thisisengineering-3861958.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Dillion Megida</p>
<p><code>git config</code> is a powerful command in Git. You can use the Git configuration file to customize how Git works. </p>
<p>This file exists in the project level where Git is initialized (<code>/project/.git/config</code>) or at the root level (<code>~/.gitconfig</code>). If no configurations are specified, Git uses its default settings.</p>
<p>In this article, you'll learn some helpful Git configurations that can improve your development workflow. The tips shared here are things that have worked for me. There are a lot more you can try after reading.</p>
<h1 id="heading-git-configuration-tips">Git Configuration Tips</h1>
<p>Here are some global Git configuration tips.</p>
<h2 id="heading-1-choose-the-default-editor-for-git">1. Choose the default editor for Git</h2>
<p>When you try to make commits in Git, it by default will open a <code>vi</code> editor that looks like this:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/03/image-18.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p>This editor can be difficult to use, and if you're like me, you may want to use your preferred editor for writing commits. In your <code>~/.gitconfig</code> file, add the following:</p>
<pre><code class="lang-txt">[core]
    editor = code --wait
</code></pre>
<p>or use this shell command:</p>
<pre><code class="lang-txt">git config --global core.editor "code --wait"
</code></pre>
<p>This configuration tells Git that for operations like commits and tags, I want to use my <a target="_blank" href="https://code.visualstudio.com/">VSCode editor</a>.</p>
<p>For other types of editors, please refer to this image from <a target="_blank" href="https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config">Atlassian</a>:</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2022/03/image-19.png" alt="Image" width="600" height="400" loading="lazy">
<em>Editor configurations for git from <a target="_blank" href="https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-config">git config | Atlassian Git Tutorial</a></em></p>
<h2 id="heading-2-git-pruning-during-fetch">2. Git pruning during fetch</h2>
<p>Do you know what the pruning command does during fetch? If not, you may want to check this article first that covers how to <a target="_blank" href="https://dillionmegida.com/p/delete-outdated-branches/#git-fetch---prune">delete outdated local branches with the prune git option and the branch delete command</a>.</p>
<p>TLDR: Pruning during fetch is a cleanup method that deletes outdated remote references in your <code>.git</code> directory when you do a <code>git fetch --prune</code>.</p>
<p>As I explain in that article I just linked, you can automate this without always adding the <code>--prune</code> option. To do this, add the following to <code>~/.gitconfig</code>:</p>
<pre><code class="lang-txt">[fetch]
    prune = true
</code></pre>
<p>or use the following command:</p>
<pre><code class="lang-shell">git config --global fetch.prune true
</code></pre>
<p>With this in place, pruning will occur whenever you do a <code>git fetch</code>.</p>
<h2 id="heading-3-git-aliases">3. Git aliases</h2>
<p>In the Git configuration file, you can add aliases for those long commands you type from time to time. For example, commits, stashing, and so on.</p>
<p>Let's say you want to add an alias for adding an empty commit. In that case, you can add the following to the config file:</p>
<pre><code class="lang-txt">[alias]
    empty = "git commit --allow-empty"
</code></pre>
<p>or in the terminal:</p>
<pre><code class="lang-shell">git config --global alias.empty "git commit --allow-empty"
</code></pre>
<p>And you can use the command like this:</p>
<pre><code class="lang-shell">git empty "Empty commit"
</code></pre>
<p>You can also add other shell commands outside Git as aliases. For example, an alias that deletes local branches that have been merged in remote:</p>
<pre><code class="lang-txt">[alias]
    delete-local-merged = "!git fetch &amp;&amp; git branch --merged | egrep -v 'master' | xargs git branch -d"
</code></pre>
<p>The exclamation mark "!" tells Git to run it as a shell command and not a <code>git *</code> command.</p>
<p>For the alias, we do a git fetch. Then we get the merged branches, pipe that as input to the egrep command, filter out the "master" branch, and delete the branches.</p>
<h2 id="heading-4-setting-the-default-branch">4. Setting the default branch</h2>
<p>When initializing a repository (<code>git init</code>), the default branch is <code>master</code>. Today, some developers would prefer that to be <code>main</code> or something else entirely.</p>
<p>You don't have to create a new branch called <code>main</code>, delete the <code>master</code> branch, and use the <code>main</code> as your default. That's a long process. In the Git configuration file, you can set a default branch upon Git initialization. Here's how:</p>
<pre><code class="lang-txt">[init]
    defaultBranch = main (or whatever name you want)
</code></pre>
<p>This way, <code>git init</code> would create a "main" branch as the default.</p>
<h2 id="heading-5-show-short-status-by-default">5. Show short status by default</h2>
<p>By default, the <code>git status</code> command shows you changes in your project with long details. It's in this format:</p>
<pre><code class="lang-bash">On branch [branch name]
Your branch is up to date with ...

Changes not staged <span class="hljs-keyword">for</span> commit:
  (use <span class="hljs-string">"git add &lt;file&gt;..."</span> to update what will be committed)
  (use <span class="hljs-string">"git restore &lt;file&gt;..."</span> to discard changes <span class="hljs-keyword">in</span> the working directory)
    modified: ...

Untracked files:
  (use <span class="hljs-string">"git add &lt;file&gt;..."</span> to include <span class="hljs-keyword">in</span> what will be committed)
    ...

no changes added to commit (use <span class="hljs-string">"git add"</span> and/or <span class="hljs-string">"git commit -a"</span>)
</code></pre>
<p>This is a helpful output with instructions, but sometimes you just need a summary of the repository status. The <code>--short</code> option added to <code>git status</code> gives a short formatted output. The result would look like this:</p>
<pre><code class="lang-bash">M [file]
?? [file]
</code></pre>
<p>"M" means modified, and "??" means untracked. We can improve this process one step further by making it the default status view using the following configuration:</p>
<pre><code class="lang-txt">[status]
    short = true
</code></pre>
<h1 id="heading-conclusion">Conclusion</h1>
<p>In this non-exhaustive list, we've seen five ways to improve our development workflow by customizing the way the Git works by default. </p>
<p>You can find more information about all the Git configuration options (from branches to pulls, to fetches, and many more) in the <a target="_blank" href="https://git-scm.com/docs/git-config">git-config Documentation</a>.</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ What Items Should Be Configurable in an Application? ]]>
                </title>
                <description>
                    <![CDATA[ By Kenneth Angelo Reyes Configuration is an essential part of every application. It helps enhance an application's flexibility and maintainability.  With this in mind, it's very important that developers are able to correctly identify what items shou... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/what-should-be-configurable-in-apps/</link>
                <guid isPermaLink="false">66d460c7787a2a3b05af43f2</guid>
                
                    <category>
                        <![CDATA[ configuring settings ]]>
                    </category>
                
                    <category>
                        <![CDATA[ configuration ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Web Applications ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ freeCodeCamp ]]>
                </dc:creator>
                <pubDate>Wed, 27 Oct 2021 20:30:15 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/10/sigmund-f0dJjQMhfXo-unsplash.jpg" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>By Kenneth Angelo Reyes</p>
<p>Configuration is an essential part of every application. It helps enhance an application's flexibility and maintainability. </p>
<p>With this in mind, it's very important that developers are able to correctly identify what items should be in configuration.</p>
<p>In this article, I'll walk you through 8 items that should be configurable in your applications.</p>
<h2 id="heading-define-configuration">Define "Configuration"</h2>
<p>We will not be aligning with any existing platforms out there.</p>
<p>For the context of this article, an application configuration has the following characteristics:</p>
<ul>
<li>A set of simple or complex values that can affect an application's behavior</li>
<li>Values can easily be changed without requiring any code deployment</li>
</ul>
<p>With that out of the way, let's go to our list!</p>
<h2 id="heading-the-configurables">The "Configurables"</h2>
<p>Here are the 8 items that should be configurable in your applications.</p>
<h3 id="heading-magic-numbers">Magic Numbers</h3>
<p>These are special numbers that are used in certain displays, validations, or business rules.</p>
<p><strong>Examples:</strong></p>
<ul>
<li>Number of days before an SLA (Service Level Agreement) is breached</li>
<li>Number of decimal places when rendering a currency</li>
</ul>
<h3 id="heading-urls">URLs</h3>
<p>When connecting to 3rd-party services, there's no knowing when their URLs will change. It's best to keep these values configurable. Additionally, configurable URLs can help you control the value in different environments.</p>
<p><strong>Examples:</strong></p>
<ul>
<li>API Endpoints</li>
<li>External websites</li>
</ul>
<h3 id="heading-feature-toggle">Feature Toggle</h3>
<p>This is helpful when there is a feature that's already in production, but which can only be enabled after a certain time.</p>
<p>An example of this is a feature that can only be enabled after a live stream event. Normally, this can be a Boolean value, but you can also use Date Time for this. This just means that the feature will automatically be enabled once that time has passed.</p>
<h3 id="heading-regex-patterns">Regex Patterns</h3>
<p>Some Regex patterns, especially those used in validation, have the potential to change regularly.</p>
<p>An example of this is phone number validation. Initially, your application might allow phone numbers from several countries. Then, perhaps a change in requirements came about where you now have to allow only phone numbers from specific countries. </p>
<p>If your validation pattern is in configuration, then you can quickly make this change.</p>
<h3 id="heading-special-dates">Special Dates</h3>
<p>Not the romantic ones! In some applications, there's a need to "block" certain dates from being selected by users.</p>
<p>A perfect example of this are public holidays. Since these dates can change regularly, they should be placed in configuration.</p>
<h3 id="heading-connection-strings">Connection Strings</h3>
<p>Database connection strings should never be placed in your code! When you place connection strings in configuration, you'll also be able to set a different value per environment.</p>
<h3 id="heading-formulas">Formulas</h3>
<p>For finance-related applications, making formulas configurable is very important. For these type of applications, adapting to policy or regulatory changes as soon as possible is a must.</p>
<h3 id="heading-special-messages">Special Messages</h3>
<p>This may be more applicable to non-CMS applications. In some cases, the regular changes in text messages are tied to legal or regulatory policies. Therefore, these messages should be easy to update.</p>
<p>A good example of this is an announcement that shows whether the application is currently facing any issues or is under maintenance.</p>
<h2 id="heading-conclusion">Conclusion</h2>
<p>These are the 8 items that I believe should be configurable in every application. I'm sure you have other items on your mind. Let me know! Looking forward to hearing from you.</p>
<p>Glad you reached the end of this article. I hope you learned something new from me today.</p>
<p>_<a target="_blank" href="https://unsplash.com/photos/f0dJjQMhfXo">Cover photo</a> <a target="_blank" href="https://unsplash.com/@sigmund?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">f</a>rom <a target="_blank" href="https://unsplash.com/s/photos/settings?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a>_</p>
 ]]>
                </content:encoded>
            </item>
        
            <item>
                <title>
                    <![CDATA[ Why You Should Use EditorConfig to Standardize Code Styles ]]>
                </title>
                <description>
                    <![CDATA[ You use EditorConfig to define formatting conventions for textual files in a project. It's great because it's widely supported, and it's not tied to any particular language, framework, or code editor. EditorConfig on its own is just a vendor-agnostic... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-use-editorconfig-to-standardize-code-styles/</link>
                <guid isPermaLink="false">66d460f2d1ffc3d3eb89de58</guid>
                
                    <category>
                        <![CDATA[ automation ]]>
                    </category>
                
                    <category>
                        <![CDATA[ configuration ]]>
                    </category>
                
                    <category>
                        <![CDATA[ configuring settings ]]>
                    </category>
                
                    <category>
                        <![CDATA[ editor ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Productivity ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Seth Falco ]]>
                </dc:creator>
                <pubDate>Wed, 21 Jul 2021 21:28:55 +0000</pubDate>
                <media:content url="https://www.freecodecamp.org/news/content/images/2021/07/untitled.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p>You use <a target="_blank" href="https://editorconfig.org/">EditorConfig</a> to define formatting conventions for textual files in a project. It's great because it's widely supported, and it's not tied to any particular language, framework, or code editor.</p>
<p>EditorConfig on its own is just a vendor-agnostic configuration file. It relies on third-party tools or integrations to implement support for the rules declared in the file.</p>
<p>They can be read by IDEs (Integrated Development Environments), code editors, or build tools to enforce or apply formatting conventions.</p>
<h2 id="heading-what-does-editorconfig-solve">What Does EditorConfig Solve?</h2>
<p>Users usually configure the code style settings in an editor to <em>their</em> preferences. Unfortunately, their preferences probably don't correlate with yours.</p>
<p>What happens when they're contributing to a shared project? This might be a project at work, or an open-source project on GitLab or GitHub.</p>
<p>The user's style settings get applied to the files they modify. This can result in projects feeling inconsistent or messy, with some or all of the following issues:</p>
<ul>
<li><p>Mixed use of tabs and spaces.</p>
</li>
<li><p>Mixed use of line endings. (Usually not a significant issue with <a target="_blank" href="https://git-scm.com/">Git</a>.)</p>
</li>
<li><p>Files may not have the desired character encoding.</p>
</li>
<li><p>Various indentation sizes across files.</p>
</li>
</ul>
<p>Without consistency, the code can appear untidy and be a pain to read, depending on a user's development environment.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/3.png" alt="Image" width="600" height="400" loading="lazy"></p>
<p><a target="_blank" href="https://github.com/eclipse/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/EventNotification.java?ts=8"><em>eclipse.jdt.ls</em></a> <em>mixes tabs and spaces, here's how it looks on GitHub with a tab size of 8.</em></p>
<p>A common solution is to share editor settings as part of the project, but this assumes all committers are using the same editor as you, which probably isn't the case.</p>
<p>For Java development alone, the following are all popular choices:</p>
<ul>
<li><p><a target="_blank" href="https://code.visualstudio.com/">Visual Studio Code</a> (What I use!)</p>
</li>
<li><p><a target="_blank" href="https://www.eclipse.org/">Eclipse</a></p>
</li>
<li><p><a target="_blank" href="https://www.jetbrains.com/idea/">IntelliJ</a></p>
</li>
<li><p><a target="_blank" href="https://netbeans.apache.org/">NetBeans</a></p>
</li>
</ul>
<p>You'll bloat your project with unrelated files if you add the configuration for every editor someone might use.</p>
<p>So, how about a vendor-agnostic solution where editors are responsible for utilizing a shared configuration instead?</p>
<h2 id="heading-how-editorconfig-helps">How EditorConfig Helps</h2>
<p>Defining conventions helps everyone throughout a project's life-cycle. There are namely three ways it saves time.</p>
<h3 id="heading-editorconfig-makes-code-more-readable">EditorConfig Makes Code More Readable</h3>
<p>Making code more readable is by far the most important reason to use it. This improves the maintainability of the project, and the speed that people can work.</p>
<blockquote>
<p>“Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code… Therefore, making it easy to read makes it easier to write.”<br>― Robert C. Martin</p>
</blockquote>
<p>There are many other reasons someone might be reading the code outside of development too:</p>
<ul>
<li><p>Researchers that need to better understand how the project works.</p>
</li>
<li><p>Security analysts that are checking for vulnerabilities.</p>
</li>
<li><p>Technical writers that are documenting application behavior.</p>
</li>
</ul>
<p>People will be able to perform their role more effectively if your code is kept tidy, consistent, and human-readable.</p>
<h3 id="heading-editorconfig-makes-code-reviews-easier">EditorConfig Makes Code Reviews Easier</h3>
<p>As a project maintainer, you'll inevitably have to review code contributed by others. They might be a fellow team member, or open-source contributors that discover your project.</p>
<p>Enforcing formatting should be delegated to software. This will make reading and reviewing the code more efficient, and avoids the need to request changes based on formatting.</p>
<p>Reducing the feedback loop ultimately saves everyone time.</p>
<h3 id="heading-editorconfig-makes-development-easier">EditorConfig Makes Development Easier</h3>
<p>Developers can save a lot of headache by having conventions that are automatically applied by their editor.</p>
<p>Without it, they have to find a contribution guide, style guide, or check other code manually to learn project conventions.</p>
<p>Even when the conventions are known, they may conflict with a developer's settings. Then they'll have to code against the editor's automatic formatting, or frequently change settings between projects.</p>
<p>This is especially useful for developers that jump between projects a lot. For example, open-source contributors frequently write code for projects across organizations that follow different coding conventions.</p>
<h2 id="heading-how-editorconfig-works">How EditorConfig Works</h2>
<p>EditorConfig uses a simple <a target="_blank" href="https://en.wikipedia.org/wiki/INI_file">INI</a>-like file named <code>.editorconfig</code>. This file declares rules that will be translated to settings in your editor, or perform formatting over your workspace.</p>
<p>For example, in my editor I use 2-space indentations for XML files, but a project I contribute to might prefer 4-space indentations.</p>
<pre><code class="lang-plaintext">[*.xml]
indent_size = 4
</code></pre>
<p>When I open the project, my editor will see the <code>.editorconfig</code> file, and override the settings to suit the project's conventions.</p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/1.png" alt="Instance of Visual Studio Code. There is an XML file on the left side which uses spaces as defined in the EditorConfig, but my default indentation size of 2." width="600" height="400" loading="lazy"></p>
<p><em>Writing an XML file with my default editor settings. I use spaces for indentation with a size of 2.</em></p>
<p><img src="https://www.freecodecamp.org/news/content/images/2021/07/2-1.png" alt="Instance of Visual Studio Code. The EditorConfig configuration includes an XML section that sets the indentation style to tab and size to 4. The XML file on the left is reformmated to reflect this change." width="600" height="400" loading="lazy"></p>
<p><em>Automatically reformatting the file after overriding the XML formatting settings.</em></p>
<h2 id="heading-how-to-use-editorconfig">How to Use EditorConfig</h2>
<p>Depending on your editor of choice, it may have native support for EditorConfig already. There is a list of "<a target="_blank" href="https://editorconfig.org/#pre-installed">No Plugin Necessary</a>" editors on the website, which includes JetBrains IDEs and Visual Studio.</p>
<p>If your editor doesn't have native support, you'll likely be able to add it with a plugin. Editors like Visual Studio Code and Eclipse support it this way, which can also be found on the EditorConfig website under "<a target="_blank" href="https://editorconfig.org/#download">Download a Plugin</a>".</p>
<p>Once installed, your editor should automatically find the EditorConfig file in your project if it exists, and start applying the rules.</p>
<h2 id="heading-how-to-define-rules-in-editorconfig">How to Define Rules in EditorConfig</h2>
<p>You can find a list of rules on the <a target="_blank" href="https://github.com/editorconfig/editorconfig/wiki/EditorConfig-Properties">EditorConfig Wiki</a>. It contains all officially supported rules, as well as proposals for domain-specific rules that may be supported by certain implementations.</p>
<p>Not all implementations support every rule. This is especially true for domain-specific rules like <code>curly_bracket_next_line</code>. It can still be worth declaring these properties anyway for users that can utilize it, or to at least document the preference.</p>
<p>You must set <code>root</code> to <code>true</code> for the top level EditorConfig in the project, which is normally in the root of your project directory.</p>
<p>Additional EditorConfig files can be defined in nested directories, but shouldn't set <code>root</code> to <code>true</code>.</p>
<p>Then you can define a header that selects files, with rules for what to apply to matching files.</p>
<pre><code class="lang-plaintext"># Declares that this is the top-level configuration
root = true

# Applies to all files
[*]
indent_style = space
indent_size = 2

# Applies to all Markdown files
[*.md]
trim_trailing_whitespace = false

# Applies to all C# and Java files, overriding rules declared before
[*.{cs,java}]
indent_size = 4
</code></pre>
<p>There are no standard conventions for how to write an <code>.editorconfig</code> file, but there are two notable approaches you can take.</p>
<h3 id="heading-define-rules-per-project">Define Rules Per Project</h3>
<p>Just add to it as you need to. This means just defining rules, or appending file formats as your project grows.</p>
<p>You can start by generating the file with your editor, or just create a file named <code>.editorconfig</code> manually. You can copy-and-paste the <a target="_blank" href="https://editorconfig.org/#example-file">example</a> from the official website.</p>
<h3 id="heading-define-rules-for-all-projects">Define Rules for All Projects</h3>
<p>Alternatively, you can put together all of your preferences and plan the ideal configuration for all files you might interact with.</p>
<p>You can work from scratch, or start with mine and make the necessary adjustments.</p>
<pre><code class="lang-plaintext">root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
curly_bracket_next_line = false
spaces_around_operators = true

[*.bat]
end_of_line = crlf

[*.cs]
curly_bracket_next_line = true

[*.{cpp,cs,gradle,java,kt,py,rs}]
indent_size = 4

[*.{js,ts}]
quote_type = single

[*.md]
trim_trailing_whitespace = false

[*.tsv]
indent_style = tab
</code></pre>
<h2 id="heading-editorconfig-rule-recommendations">EditorConfig Rule Recommendations</h2>
<p>These are rules I'd objectively recommend declaring, if your project contains the respective file format. It'll help you avoid tedious issues that can occur due to a user's development environment.</p>
<h3 id="heading-batch">Batch</h3>
<p>Line endings need to have a textual representation when stored. This is usually something you wouldn't see or have to worry about.</p>
<p>However, different systems use different characters to represent the end of a line. (<a target="_blank" href="https://en.wikipedia.org/wiki/Newline#Representation">More Info</a>)</p>
<ul>
<li><p>Unix systems use a line feed. (<code>lf</code> or <code>\n</code>)</p>
</li>
<li><p>Windows uses a carriage return and line feed. (<code>crlf</code> or <code>\r\n</code>)</p>
</li>
</ul>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Batch_file">Batch</a> files can have unexpected behavior if they end with Unix line endings. You can avoid this by setting <code>end_of_line</code> to <code>crlf</code> to ensure they have Windows line endings instead. (<a target="_blank" href="https://serverfault.com/questions/429594/is-it-safe-to-write-batch-files-with-unix-line-endings">More Info</a>)</p>
<pre><code class="lang-plaintext">[*.bat]
end_of_line = crlf
</code></pre>
<h3 id="heading-markdown">Markdown</h3>
<p>In <a target="_blank" href="https://en.wikipedia.org/wiki/Markdown">Markdown</a>, you can write a line break in the current paragraph by adding 2 spaces at the end of a line. (<a target="_blank" href="https://en.wikipedia.org/wiki/Markdown#Example">More Info</a>)</p>
<p>You'll want to set <code>trim_trailing_whitespace</code> to <code>false</code> to avoid having your editor remove those spaces when you save.</p>
<pre><code class="lang-plaintext">[*.md]
trim_trailing_whitespace = false
</code></pre>
<h3 id="heading-tab-separated-values">Tab Separated Values</h3>
<p><a target="_blank" href="https://en.wikipedia.org/wiki/Tab-separated_values">TSV</a> (Tab Separated Values) files are very similar to <a target="_blank" href="https://en.wikipedia.org/wiki/Comma-separated_values">CSV</a> (Comma Separated Values), but use tabs instead of commas as the column delimiter.</p>
<p>It's very common for developers to have tabs automatically convert to spaces. You should set <code>indent_style</code> to <code>tab</code> to avoid the delimiter from being replaced, otherwise your entire table might become a single column.</p>
<pre><code class="lang-plaintext">[*.tsv]
indent_style = tab
</code></pre>
<h2 id="heading-conclusion">Conclusion</h2>
<p>If you're a maintainer, either working in a collaborative environment or in open-source, I strongly recommend adding an <code>.editorconfig</code> file defining the project's conventions to the root of your repository.</p>
<p>Maintainers can then spend more time reviewing clean pull requests that adhere to the style guide, as the editor will automatically start enforcing or applying the conventions.</p>
<p>Committers get a better experience, as the project will override their workspace settings. This reduces the need to reformat code or work against preconfigured editor settings.</p>
<p>And projects will be cleaner, as the conventions will be in a single vendor-agnostic file, rather than editor-specific files that only certain contributors can use anyway.</p>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
