Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'atom-beautify.yaml.padding' could not set the default #1647

Closed
4 tasks done
jeffs opened this issue May 6, 2017 · 2 comments · Fixed by #1648 · May be fixed by #2643
Closed
4 tasks done

'atom-beautify.yaml.padding' could not set the default #1647

jeffs opened this issue May 6, 2017 · 2 comments · Fixed by #1648 · May be fixed by #2643
Labels

Comments

@jeffs
Copy link
Contributor

jeffs commented May 6, 2017

Description

I see odd errors related to atom-beautify in the dev console:

'atom-beautify.yaml.padding' could not set the default. Attempted default: undefined; Schema: {"type":"integer","default":null,"minimum":0,"description":"The amount of padding to add next to each line. (Supported by align-yaml)","title":"Padding","beautifiers":["align-yaml"],"key":"padding","language":{"name":"YAML","namespace":"yaml"}}

These errors are reported even when YAML is disabled in the atom-beautify package settings. Opening a YAML file does not trigger them, but merely opening Settings/Packages does. In fact, immediately upon installation of atom-beautify, the error is reported twice.

Steps to Reproduce

  1. Open Atom.
  2. Open Settings.
  3. Select Packages.
  4. Look at the console.

Checklist

I have:

  • Tried uninstalling and reinstalling Atom Beautify to ensure it installed properly
  • Reloaded (or restarted) Atom to ensure it is not a caching issue
  • Searched through existing Atom Beautify Issues at https://github.com/Glavin001/atom-beautify/issues
    so I know this is not a duplicate issue
  • Filled out the Input, Expected, and Actual sections above or have edited/removed them in a way that fully describes the issue.
  • [NA] Generated debugging information by executing Atom Beautify: Help Debug Editor command in Atom and added link for debug.md Gist to this issue
    • Not applicable. No editor is open; only Workspace and Settings. Help Debug Editor duly reports: "Active Editor not found. Please select a Text Editor first to beautify."
@Glavin001 Glavin001 added the bug label May 6, 2017
@Glavin001
Copy link
Owner

Glavin001 commented May 6, 2017

I am noticing this, too. It is a bug.

The issue is the default value is null for padding: https://github.com/Glavin001/atom-beautify/blob/master/src/languages/yaml.coffee#L28

I suppose it should be default value of 0.

Pull requests welcome!

  • Set default value of padding to 0
  • Update docs with npm run docs

@jeffs
Copy link
Contributor Author

jeffs commented May 6, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants