There is a list of " No Plugin Necessary" editors on the website, which includes JetBrains IDEs and Visual Studio. How to Use EditorConfigĭepending on your editor of choice, it may have native support for EditorConfig already. Automatically reformatting the file after overriding the XML formatting settings. I use spaces for indentation with a size of 2. Writing an XML file with my default editor settings. editorconfig file, and override the settings to suit the project's conventions. When I open the project, my editor will see the. editorconfig section that indicates XML files should have an indentation size of 4. This file declares rules that will be translated to settings in your editor, or perform formatting over your workspace.įor example, in my editor I use 2-space indentations for XML files, but a project I contribute to might prefer 4-space indentations. How EditorConfig WorksĮditorConfig uses a simple INI-like file named. For example, open-source contributors frequently write code for projects across organizations that follow different coding conventions. This is especially useful for developers that jump between projects a lot. Then they'll have to code against the editor's automatic formatting, or frequently change settings between projects. Without it, they have to find a contribution guide, style guide, or check other code manually to learn project conventions.Įven when the conventions are known, they may conflict with a developer's settings. EditorConfig Makes Development Easierĭevelopers can save a lot of headache by having conventions that are automatically applied by their editor. Reducing the feedback loop ultimately saves everyone time. This will make reading and reviewing the code more efficient, and avoids the need to request changes based on formatting. They might be a fellow team member, or open-source contributors that discover your project.Įnforcing formatting should be delegated to software. EditorConfig Makes Code Reviews EasierĪs a project maintainer, you'll inevitably have to review code contributed by others. People will be able to perform their role more effectively if your code is kept tidy, consistent, and human-readable. Technical writers that are documenting application behavior. Security analysts that are checking for vulnerabilities.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |