Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Commit

Permalink
fix: correct github repo name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeagle committed Sep 15, 2022
1 parent e0fc95b commit 7803a5f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/workspace_snippet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ http_archive(
name = "aspect_rules_format",
sha256 = "${SHA}",
strip_prefix = "${PREFIX}",
url = "https://github.com/aspect-build/rules_format/archive/refs/tags/${TAG}.tar.gz",
url = "https://github.com/aspect-build/bazel-super-formatter/archive/refs/tags/${TAG}.tar.gz",
)
EOF

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Supported languages:
Install Bazel: <https://bazel.build/install/bazelisk>

From the release you wish to use:
<https://github.com/aspect-build/rules_format/releases>
<https://github.com/aspect-build/bazel-super-formatter/releases>
copy the WORKSPACE snippet into your `WORKSPACE` file.

## Usage
Expand Down
1 change: 1 addition & 0 deletions e2e/workspace/.bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build --@aspect_rules_format//format:java_enabled=false
build --@aspect_rules_format//format:swift_enabled=false
20 changes: 10 additions & 10 deletions format/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,37 +65,37 @@ esac

files=$(git ls-files '*/BUILD.bazel' '*.bzl' '*.BUILD' 'WORKSPACE' '*.bazel')
bin=$(rlocation buildifier_prebuilt/buildifier/buildifier)
[ -n "$files" ] && [ -n "$bin" ] && {
if [ -n "$files" ] && [ -n "$bin" ]; then
echo "Running Buildifier..."
echo $files | xargs $bin -mode="$mode"
}
fi

files=$(git ls-files '*.js' '*.sh' '*.ts' '*.tsx' '*.json' '*.css' '*.html' '*.md' '*.yaml' '*.yml')
bin=$(rlocation aspect_rules_format/format/prettier.sh)
[ -n "$files" ] && [ -n "$bin" ] && {
if [ -n "$files" ] && [ -n "$bin" ]; then
echo "Running Prettier..."
echo $files | xargs $bin $prettiermode
}
fi

files=$(git ls-files '*.py' '*.pyi')
bin=$(rlocation aspect_rules_format_pypi_black/rules_python_wheel_entry_point_black)
[ -n "$files" ] && [ -n "$bin" ] && {
if [ -n "$files" ] && [ -n "$bin" ]; then
echo "Running black..."
echo $files | xargs $bin $blackmode
}
fi

files=$(git ls-files '*.java')
bin=$(rlocation aspect_rules_format/format/java-format)
[ -n "$files" ] && [ -n "$bin" ] && {
if [ -n "$files" ] && [ -n "$bin" ]; then
echo "Running java-format..."
# Setting JAVA_RUNFILES to work around https://github.com/bazelbuild/bazel/issues/12348
echo $files | JAVA_RUNFILES="${RUNFILES_MANIFEST_FILE%_manifest}" xargs $bin $javamode
}
fi

# TODO: don't hardcode "linux"
files=$(git ls-files '*.swift')
bin=$(rlocation swiftformat/swiftformat_linux)
[ -n "$files" ] && [ -n "$bin" ] && {
if [ -n "$files" ] && [ -n "$bin" ]; then
# swiftformat itself prints Running SwiftFormat...
echo $files | xargs $bin $swiftmode
}
fi

0 comments on commit 7803a5f

Please sign in to comment.