Skip to content

Commit

Permalink
Clarify that cores report all keys, whether or not supported (#37)
Browse files Browse the repository at this point in the history
* Terminology: mention key-value pairs

- Clarify that cores produce, and plugins consume, key-value pairs.
- Clarify that a plugin should ignore invalid/unsupported values,
  regardless of whether the plugin recognizes that key.
- Bump version to 0.15.1.  This is a PATCH level change since it
  documents existing behaviour more clearly.

* Clarify that cores process all key-value pairs, whether or not supported

The core tests use many key-value pairs with keys that are not defined
as "Supported Pairs" in the specification.  Clarify that cores must
report all key-value pairs, regardless of whether those pairs are
listed in the spec as supported.  It is up to the plugin to ignore keys
it does not recognize.

* Rename "Terms" to "Parts of an EditorConfig file"

To distinguish that section from "Terminology"
  • Loading branch information
cxw42 authored Jan 22, 2023
1 parent 2ab7f99 commit b50ab46
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 13 deletions.
4 changes: 2 additions & 2 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
copyright = '2019--2020, EditorConfig Team'
author = 'EditorConfig Team'

version = '0.15.0'
release = '0.15.0'
version = '0.15.1'
release = '0.15.1'

# -- General configuration ---------------------------------------------------

Expand Down
33 changes: 22 additions & 11 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ with version control systems.
Terminology
===========

.. versionchanged:: 0.15.1

In EditorConfig:

- "EditorConfig files" (usually named ``.editorconfig``) store settings,
and must conform to this specification.
- "Cores" parse files conforming to this specification.
- "Plugins" apply settings to files being edited, and use cores to
determine the settings.
- "Editors" permit editing files, and use plugins to apply settings.
- "EditorConfig files" (usually named ``.editorconfig``) include section(s)
storing key-value pairs. EditorConfig files must conform to
this specification.
- "Cores" parse files conforming to this specification, and provide
key-value pairs to plugins.
- "Plugins" receive key-value pairs from cores and update an editor's
settings based on the key-value pairs.
- "Editors" permit editing files, and use plugins to update settings for
files being edited.

A conforming core or plugin must pass the tests in the
`core-tests repository`_ or `plugin-tests repository`_, respectively.
Expand Down Expand Up @@ -113,10 +118,10 @@ This specification does not define any "escaping" mechanism for
confusion how to parse values containing those characters. Old EditorConfig
parsers may still allow inline comments.
Terms
-----
Parts of an EditorConfig file
-----------------------------

EditorConfig defines the following terms for parts of an EditorConfig file:
The parts of an EditorConfig file are:

- Preamble: the lines that precedes the first section. The preamble is optional
and may contain key-value pairs, comments and blank lines.
Expand Down Expand Up @@ -179,10 +184,16 @@ files take precedence.
Supported Pairs
===============

.. versionchanged:: 0.15.1

EditorConfig file sections contain key-value pairs separated by an
equal sign (``=``). With the exception of the ``root`` key, all pairs MUST be
located under a section to take effect. EditorConfig plugins shall ignore
unrecognized keys and invalid/unsupported values for those keys.
located under a section to take effect.

- EditorConfig cores shall accept and report all syntactically valid
key-value pairs, even if the key is not defined in this specification.
- EditorConfig plugins shall ignore unrecognized keys and invalid/unsupported
values.

Here is the list of all keys defined by this version of this specification,
and the supported values associated with them:
Expand Down

0 comments on commit b50ab46

Please sign in to comment.