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

Terraform TextMate Test Infrastructure #3

Merged
merged 6 commits into from
Feb 25, 2022
Merged

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Jan 27, 2022

This PR:

  • Pulls in latest terraform.tmGrammar.json file from the vscode-terraform project
  • Moves the Terraform grammar file to standard syntaxes directory instead of a product specific named directory
  • Add tmGrammar schema to project to enable VS Code to provide intellisense and minimal validation of the tmGrammar files, whether they are json or yaml. It also adds a minimal prettier config to give enough room for the rule line lengths to not wrap excessively, which aids in reading large sections
  • Adds testing infrastructure using vscode-tmgrammar-test to test the Terraform tmGrammar file.
  • Updates the README and adds documentation on how to edit and test the Terraform tmGrammar
  • Automatically tests the grammar on every pull request

Close #4

@jpogran jpogran added documentation Improvements or additions to documentation enhancement New feature or request labels Jan 27, 2022
@jpogran jpogran requested a review from a team January 27, 2022 18:22
@jpogran jpogran self-assigned this Jan 27, 2022
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

LGTM! I added a few naming suggestions.

@jpogran jpogran force-pushed the test_terraform_tmgrammar branch from f9ad996 to 1de1847 Compare January 28, 2022 13:10
@jpogran jpogran marked this pull request as draft February 1, 2022 14:13
@jpogran
Copy link
Contributor Author

jpogran commented Feb 1, 2022

Moving this to draft. Team has decided to work on the syntax directly on the version in the vscode-terraform repo, then move here once that is complete.

@jpogran jpogran force-pushed the test_terraform_tmgrammar branch from 1de1847 to 668c888 Compare February 25, 2022 01:05
@jpogran jpogran marked this pull request as ready for review February 25, 2022 01:10
@jpogran jpogran added this to the 0.1.0 milestone Feb 25, 2022
Copy link
Member

@dbanck dbanck left a comment

Choose a reason for hiding this comment

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

LGTM!

on:
push:
branches:
- "master"
Copy link
Member

Choose a reason for hiding this comment

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

Should be main now

This moves the Terraform grammar file to standard `syntaxes` directory instead of a product specific named directory. This is an unofficial convention among TextMate projects for the file that is distributed to clients.
This enables VS Code to provide intellisense and minimal validation of the tmGrammar files, whether they are json or yaml. It also adds a minimal prettier config to give enough room for the rule line lengths to not wrap excessively, which aids in reading large sections.
This adds testing infrastructure using `vscode-tmgrammar-test` to test the Terraform tmGrammar file. A minimal example file is used to demonstrate basic testing. Additional tests will be added as grammar is modified or changed.
This adds a test runner GitHub Action that runs against new pull requests.
This updates the README and adds documentation on how to edit and test the Terraform tmGrammar.

It copies some wording from the vscode-terraform project.
@jpogran jpogran force-pushed the test_terraform_tmgrammar branch from 668c888 to fce7304 Compare February 25, 2022 16:56
@jpogran jpogran merged commit 539a260 into main Feb 25, 2022
@dbanck dbanck deleted the test_terraform_tmgrammar branch February 25, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migrate terraform grammar to syntax repo
2 participants