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 pre-commit for Bicep files #273

Merged
merged 3 commits into from
Feb 5, 2024

Conversation

cecheta
Copy link
Collaborator

@cecheta cecheta commented Feb 5, 2024

Closes #209

Purpose

This PR adds a local pre-commit to format Bicep files, and generate ARM templates. Note that it is quite slow, as it takes a few seconds to format and build each Bicep file. Requires AZ CLI installed.

Does this introduce a breaking change?

[ ] Yes
[x] No

Pull Request Type

What kind of change does this Pull Request introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Documentation content changes
[ ] Other... Please describe:

How to Test

  • Make updates to .bicep files
  • Check that they have been formatted and the JSON ARM templates have been rebuilt, and added to the commit

image
image

@cecheta cecheta linked an issue Feb 5, 2024 that may be closed by this pull request
@ross-p-smith
Copy link
Collaborator

Are you able to bump the pre-commit version to 3.6.0 and test (it will fix another open PR!) :-)

@cecheta
Copy link
Collaborator Author

cecheta commented Feb 5, 2024

Are you able to bump the pre-commit version to 3.6.0 and test (it will fix another open PR!) :-)

Working fine 👍

@ross-p-smith ross-p-smith added this pull request to the merge queue Feb 5, 2024
Merged via the queue into Azure-Samples:main with commit d808211 Feb 5, 2024
3 checks passed
eduardogch pushed a commit to devopsdale/chat-with-your-data-solution-accelerator that referenced this pull request Apr 30, 2024
* Add pre-commit for Bicep files

* Format all Bicep files

* Bump pre-commit
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.

Generate deployment.json file as a pre-commit hook
2 participants