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

Add Stoplight Spectral linter for yaml #3489

Merged
merged 3 commits into from
Jan 23, 2021

Conversation

t2h5
Copy link
Contributor

@t2h5 t2h5 commented Dec 14, 2020

image

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This linter is very useful, did not know about it. Would be great if this PR also added support for JSON files. It should not be difficult to achieve.

Check for example redpen linter that supports many file types: markdown, rst, tex, text, etc. All methods used by the linter are defined in autoload/ale/handlers/redpen.vim and then only the linter definitions are in the respective file type paths: ale_linters/text/redpen.vim, ale_linters/markdown/redpen.vim, etc.

@t2h5
Copy link
Contributor Author

t2h5 commented Jan 6, 2021

Added JSON support.

@hsanson
Copy link
Contributor

hsanson commented Jan 7, 2021

@w0rp seems travis CI is somehow stuck... may PRs are waiting for status report and cannot be merged.

hsanson
hsanson previously approved these changes Jan 7, 2021
Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes are good and tested the linter works properly on my own openapi yaml and json definitions.

@hsanson
Copy link
Contributor

hsanson commented Jan 22, 2021

ALE migrated from Travis to Github Actions (see #3548) so it is necessary to rebase this PR from latest master branch to trigger the required checks.

# Add dense-analysis as remote upstream on your local fork. Not 
# needed if already added.
git remote add upstream https://github.com/dense-analysis/ale.git

# Sync your local master with upstream master
git checkout master
git fetch upstream master
git merge upstream/master

# Rebase the PR branch with master
git checkout my-branch-name
git rebase master   # Fix any conflicts you may have

# Force push the updated PR branch to origin to trigger the checks
git push -f origin my-branch-name

Copy link
Contributor

@hsanson hsanson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go, thanks.

@hsanson hsanson merged commit 3c3dcd4 into dense-analysis:master Jan 23, 2021
@t2h5 t2h5 deleted the yaml-spectral-linter branch January 23, 2021 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants