-
Notifications
You must be signed in to change notification settings - Fork 705
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
[CI] Add prettier pre-commit hook and format YAML files #1716
Merged
jiayuasu
merged 4 commits into
apache:master
from
jbampton:add-prettier-pre-commit-hook
Mar 29, 2025
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,40 +16,40 @@ | |
# under the License. | ||
|
||
notifications: | ||
commits: [email protected] | ||
issues_status: [email protected] | ||
issues_comment: [email protected] | ||
discussions: [email protected] | ||
pullrequests_status: [email protected] | ||
pullrequests_comment: [email protected] | ||
jira_options: link label worklog | ||
commits: [email protected] | ||
issues_status: [email protected] | ||
issues_comment: [email protected] | ||
discussions: [email protected] | ||
pullrequests_status: [email protected] | ||
pullrequests_comment: [email protected] | ||
jira_options: link label worklog | ||
github: | ||
description: "A cluster computing framework for processing large-scale geospatial data" | ||
homepage: https://sedona.apache.org/ | ||
collaborators: | ||
- MrPowers | ||
- umartin | ||
- zhangfengcdt | ||
- james-willis | ||
- gregleleu | ||
autolink_jira: | ||
- SEDONA | ||
labels: | ||
- geospatial | ||
- cluster-computing | ||
- spatial-query | ||
- spatial-analysis | ||
- spatial-sql | ||
- scala | ||
- java | ||
- python | ||
features: | ||
# Enable wiki for documentation | ||
wiki: false | ||
# Enable issue management | ||
issues: true | ||
# Enable projects for project management boards | ||
projects: false | ||
# Enable github discussion | ||
discussions: true | ||
ghp_branch: | ||
description: 'A cluster computing framework for processing large-scale geospatial data' | ||
homepage: https://sedona.apache.org/ | ||
collaborators: | ||
- MrPowers | ||
- umartin | ||
- zhangfengcdt | ||
- james-willis | ||
- gregleleu | ||
autolink_jira: | ||
- SEDONA | ||
labels: | ||
- geospatial | ||
- cluster-computing | ||
- spatial-query | ||
- spatial-analysis | ||
- spatial-sql | ||
- scala | ||
- java | ||
- python | ||
features: | ||
# Enable wiki for documentation | ||
wiki: false | ||
# Enable issue management | ||
issues: true | ||
# Enable projects for project management boards | ||
projects: false | ||
# Enable GitHub discussion | ||
discussions: true | ||
ghp_branch: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -64,7 +64,7 @@ jobs: | |
cache: true | ||
extra-packages: | | ||
any::pkgdown | ||
working-directory : './R' | ||
working-directory: './R' | ||
- run: Rscript -e 'pkgdown::build_site(pkg = "./R", preview = FALSE, override = list(destination = "../docs/api/rdocs"))' | ||
- run: git config --global user.name = "GitHub Action" | ||
- run: git config --global user.email = "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,7 @@ jobs: | |
extra-packages: | | ||
any::testthat | ||
any::rcmdcheck | ||
working-directory : './R' | ||
working-directory: './R' | ||
- name: Build and check R package | ||
uses: r-lib/actions/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,8 @@ default_stages: [pre-commit, pre-push] | |
default_language_version: | ||
# force all unspecified Python hooks to run python3 | ||
python: python3 | ||
# force all unspecified Node hooks to run Node.js v22.14.0 LTS | ||
node: 22.14.0 | ||
minimum_pre_commit_version: '3.2.0' | ||
repos: | ||
- repo: meta | ||
|
@@ -29,6 +31,15 @@ repos: | |
name: run identity check | ||
- id: check-hooks-apply | ||
name: run check hooks apply | ||
- repo: local | ||
hooks: | ||
- id: prettier | ||
name: run prettier | ||
description: format files with prettier | ||
entry: prettier --write '**/*.yaml' '**/*.yml' | ||
files: \.ya?ml$ | ||
language: node | ||
additional_dependencies: ['[email protected]'] | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.5.5 | ||
hooks: | ||
|
@@ -37,7 +48,7 @@ repos: | |
files: \.c$ | ||
args: | ||
- --comment-style | ||
- "/*| *| */" | ||
- '/*|*|*/' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -46,7 +57,7 @@ repos: | |
files: \.h$ | ||
args: | ||
- --comment-style | ||
- "/*| *| */" | ||
- '/*| *| */' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -55,7 +66,7 @@ repos: | |
files: \.java$ | ||
args: | ||
- --comment-style | ||
- "/*|*|*/" | ||
- '/*|*|*/' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -64,7 +75,7 @@ repos: | |
files: \.md$ | ||
args: | ||
- --comment-style | ||
- "<!--|| -->" | ||
- '<!--|| -->' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -74,7 +85,7 @@ repos: | |
files: ^Makefile$ | ||
args: | ||
- --comment-style | ||
- "|#|" | ||
- '|#|' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -83,7 +94,7 @@ repos: | |
files: \.R$ | ||
args: | ||
- --comment-style | ||
- "|#|" | ||
- '|#|' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -92,7 +103,7 @@ repos: | |
files: \.scala$ | ||
args: | ||
- --comment-style | ||
- "/*| *| */" | ||
- '/*| *| */' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -101,7 +112,7 @@ repos: | |
files: \.toml$ | ||
args: | ||
- --comment-style | ||
- "|#|" | ||
- '|#|' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -110,7 +121,7 @@ repos: | |
files: \.ya?ml$ | ||
args: | ||
- --comment-style | ||
- "|#|" | ||
- '|#|' | ||
- --license-filepath | ||
- .github/workflows/license-templates/LICENSE.txt | ||
- --fuzzy-match-generates-todo | ||
|
@@ -134,8 +145,8 @@ repos: | |
- id: bandit | ||
name: run bandit | ||
description: check Python code for security issues | ||
args: ["-c=pyproject.toml", "-r"] | ||
additional_dependencies: ["bandit[toml]"] | ||
args: ['-c=pyproject.toml', '-r'] | ||
additional_dependencies: ['bandit[toml]'] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.4.1 | ||
hooks: | ||
|
@@ -229,4 +240,4 @@ repos: | |
- id: oxipng | ||
name: run oxipng | ||
description: check PNG files with oxipng | ||
args: ["-o", "4", "--strip", "safe", "--alpha"] | ||
args: ['-o', '4', '--strip', 'safe', '--alpha'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.json | ||
.idea | ||
.mypy_cache | ||
.venv | ||
site/ | ||
target/ | ||
binder/Pipfile.lock | ||
docs-overrides/main.html | ||
zeppelin/index.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"bracketSpacing": false, | ||
"singleQuote": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Node.js
v22.14.0
is the LTS version we should be now using.https://nodejs.org/en
And seen on the pre-commit site we can set the node version as default.
For node they use nodeenv.
https://pre-commit.com/#overriding-language-version
And here shows how nodeenv uses and lists its version numbers without the
v
prefix:nodeenv --list
https://github.com/ekalinin/nodeenv?tab=readme-ov-file#advanced