forked from starship/starship
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Use
dprint
to format documentation + TOML files (starship#3426)
Adds Rust-based standardized markdown formatting and a CI step to catch unformatted files.
- Loading branch information
1 parent
9a4c1b5
commit 0965667
Showing
16 changed files
with
903 additions
and
833 deletions.
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 |
---|---|---|
@@ -1,14 +1,14 @@ | ||
[advisories] | ||
ignore = [ | ||
# Out-of-bounds write in nix::unistd::getgrouplist | ||
# Tracked in #3140 | ||
"RUSTSEC-2021-0119", | ||
# Potential segfault in the time crate | ||
# chrono dependency, but vulnerable function is never called | ||
# Tacked in #3163 | ||
"RUSTSEC-2020-0071", | ||
# chrono: Potential segfault in localtime_r invocations | ||
# starship avoids setting any environment variables to avoid this issue | ||
# Tracked in #3166 | ||
"RUSTSEC-2020-0159", | ||
] | ||
# Out-of-bounds write in nix::unistd::getgrouplist | ||
# Tracked in #3140 | ||
"RUSTSEC-2021-0119", | ||
# Potential segfault in the time crate | ||
# chrono dependency, but vulnerable function is never called | ||
# Tacked in #3163 | ||
"RUSTSEC-2020-0071", | ||
# chrono: Potential segfault in localtime_r invocations | ||
# starship avoids setting any environment variables to avoid this issue | ||
# Tracked in #3166 | ||
"RUSTSEC-2020-0159", | ||
] |
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,43 @@ | ||
{ | ||
"incremental": true, | ||
"typescript": {}, | ||
"json": {}, | ||
"markdown": { | ||
"lineWidth": 100 | ||
}, | ||
"toml": {}, | ||
"includes": [ | ||
"docs/**/*.{ts,js,cjs,mjs}", | ||
"**/*.{md,toml,json}" | ||
], | ||
"excludes": [ | ||
"**/node_modules", | ||
"**/*-lock.json", | ||
".github/*", | ||
"docs/ar-SA/**", | ||
"docs/ckb-IR/**", | ||
"docs/de-DE/**", | ||
"docs/es-ES/**", | ||
"docs/fr-FR/**", | ||
"docs/id-ID/**", | ||
"docs/it-IT/**", | ||
"docs/ja-JP/**", | ||
"docs/ko-KR/**", | ||
"docs/nl-NL/**", | ||
"docs/pl-PL/**", | ||
"docs/pt-BR/**", | ||
"docs/pt-PT/**", | ||
"docs/ru-RU/**", | ||
"docs/tr-TR/**", | ||
"docs/vi-VN/**", | ||
"docs/zh-CN/**", | ||
"docs/zh-TW/**", | ||
"target/" | ||
], | ||
"plugins": [ | ||
"https://plugins.dprint.dev/typescript-0.62.0.wasm", | ||
"https://plugins.dprint.dev/json-0.14.0.wasm", | ||
"https://plugins.dprint.dev/markdown-0.12.0.wasm", | ||
"https://plugins.dprint.dev/toml-0.5.3.wasm" | ||
] | ||
} |
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,17 @@ | ||
name: Format + Docs Workflow | ||
on: | ||
push: | ||
paths: ["docs/**","**.md","**.toml","**.js","**.json","**.ts"] | ||
pull_request: | ||
paths: ["docs/**","**.md","**.toml","**.js","**.json","**.ts"] | ||
|
||
jobs: | ||
# Run the dprint code formatter for documentation | ||
dprint: | ||
name: Dprint [Docs Formatter] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/[email protected] | ||
- name: Docs | Format | ||
uses: dprint/[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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
disallowed-methods = [ | ||
# std::process::Command::new may inadvertly run executables from the current working directory | ||
"std::process::Command::new", | ||
# Setting environment variables can cause issues with non-rust code | ||
"std::env::set_var" | ||
# std::process::Command::new may inadvertly run executables from the current working directory | ||
"std::process::Command::new", | ||
# Setting environment variables can cause issues with non-rust code | ||
"std::env::set_var", | ||
] |
Oops, something went wrong.