Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add vale linting as a build step in Xcode
- Add script calling Vale. If vale is not available, pass successful. - Add docusaurus as a folder tothe xcode project, making sure it is not part of any targets. This allows error reporting to be shown in Xcode - Add a template file containing an output config that Xcode can interpret
- Loading branch information
1 parent
ecf4c4d
commit 89ed43a
Showing
3 changed files
with
45 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{{range .Files}} | ||
{{- $path := .Path -}} | ||
{{- range .Alerts -}} | ||
{{$path}}:{{.Line}}:{{index .Span 0}}: {{.Severity}}: {{.Check}}:{{.Message}} | ||
{{end -}} | ||
{{end -}} |
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
if ! which vale >/dev/null; then | ||
if ! which brew >/dev/null; then # If it's not found, check the Homebrew location and update PATH when needed | ||
if test -e "/usr/local/bin/brew"; then # Default Homebrew location (pre M1 era) | ||
PATH="${PATH}:/usr/local/bin" | ||
elif test -e "/opt/homebrew/bin/brew"; then # Default Homebrew location (M1 era) | ||
PATH="${PATH}:/opt/homebrew/bin" | ||
else | ||
echo "warning: Homebrew not found at default location" | ||
fi | ||
fi | ||
fi | ||
|
||
if which vale >/dev/null; then | ||
vale --output=./.styles/xcode-line.tmpl docusaurus | ||
else | ||
echo "warning: Vale not installed, download from https://vale.sh" | ||
fi |