sindresorhus / atom-editorconfig

Helps developers maintain consistent coding styles between different editors
https://atom.io/packages/editorconfig
MIT License
812 stars 80 forks source link

Notify user about malformed editorconfig-files #141

Closed florianb closed 4 years ago

florianb commented 7 years ago

Issuehunt badges

Users should get notified about malformed .editorconfig-files.

To make this "feature" appropriate to the current implementation of notifications i suggest "notifying" by raising the atom-editorconfig-state to warning (which shows the yellow 🐭 in the status-bar) and adding a describing paragraph in the "Show State" result.

This could be done in an extra file and function since the validating purposes exceed in my opinion the intention of the index-file.

I therefore propose the implementation of a lib/validate.js containing a function with the following interface:

validate(config = {}) { // The config contains the computed editorconfig-properties
  return {
    statusCode: 2, // 0: inactive, 1: working as expected, 2: warning, 3: error
    max_line_length: [
      'error-messages as markdown'
      // Several different issues may belong to a single property
    ]
  }
}

This function should at least cover


IssueHunt Summary #### [elarivie elarivie](https://issuehunt.io/u/elarivie) has been rewarded. ### Backers (Total: $60.00) - [issuehunt issuehunt](https://issuehunt.io/u/issuehunt) ($60.00) ### Submitted pull Requests - [#236 Add feature to Lint .editorconfig file](https://issuehunt.io/r/sindresorhus/atom-editorconfig/pull/236) --- ### Tips - Checkout the [Issuehunt explorer](https://issuehunt.io/r/sindresorhus/atom-editorconfig/) to discover more funded issues. - Need some help from other developers? [Add your repositories](https://issuehunt.io/r/new) on IssueHunt to raise funds. --- IssueHunt has been backed by the following sponsors. [Become a sponsor](https://issuehunt.io/membership/members)
IssueHuntBot commented 5 years ago

@issuehunt has funded $60.00 to this issue.


issuehunt-oss[bot] commented 4 years ago

@sindresorhus has rewarded $54.00 to @elarivie. See it on IssueHunt