Skip to content
This repository was archived by the owner on Sep 6, 2021. It is now read-only.
This repository was archived by the owner on Sep 6, 2021. It is now read-only.

Write json errors on console #12834

Open
Open
@ficristo

Description

@ficristo

Prerequisites

  • Can you reproduce the problem with Debug \ Reload Without Extensions?
  • Did you perform a cursory search to see if your bug or enhancement is already reported?
  • Did you read the Troubleshooting guide?

For more information on how to write a good bug report read here
For more information on how to contribute read here

Description

In #12831 I had a briefly discussion with @redmunds:

@ficristo

I think would be even better having a json linter in core.

I'm ok with that as long as user has a way to disable it.

While I'm the one that proposed the extension approach, actually I don't want another situation like the one with JSLint.
So I agree with @redmunds that if we add one we have to be careful in how we integrate it.

And more better our json files should not be strict json, they should support, for example, comments in them. Something like gyp file which support also trailing commas.

Totally agree.

Maybe trailing commas are too much, but comments IMHO are really needed.

But yes, as short gap would be nice printing something in the console in case of error.

While I agree, with both of those suggestions, they won't catch all cases, so errors should still be written to console.

We should check at least all json file used directly by Brackets core (brackets.json, ...)

Steps to Reproduce

  1. Create a .brackets.json
  2. Write an invalid json
  3. Open the Console of Developer Tools

Expected behavior:
A warning logged

Actual behavior:
Zero warning

Versions

Windows 10
master

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions