Skip to content

Commit 1772ebd

Browse files
authored
ci: Check pre-commit hooks in CI (#922)
* ci: Check pre-commit hooks in CI * fix buildifier warnings * fix buildifier warnings * fix exclude
1 parent ddaa101 commit 1772ebd

File tree

8 files changed

+22
-2
lines changed

8 files changed

+22
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Pre-Commit
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
jobs:
10+
pre-commit:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: pre-commit/[email protected]

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ repos:
2929
exclude: |
3030
(?x)^(
3131
CHANGELOG.md|
32-
tests/testdata/|
32+
tests/testdata/
3333
)

mappings.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
"""File mappings for packaging rules."""
16+
1517
load(
1618
"//pkg:mappings.bzl",
1719
_REMOVE_BASE_DIRECTORY = "REMOVE_BASE_DIRECTORY",

pkg.bzl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
"""Rules for manipulation of various packaging."""
16+
1517
load("//pkg:deb.bzl", _pkg_deb = "pkg_deb")
1618
load("//pkg:tar.bzl", _pkg_tar = "pkg_tar")
1719
load("//pkg:zip.bzl", _pkg_zip = "pkg_zip")

pkg/pkg.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14+
1415
"""Rules for manipulation of various packaging."""
1516

1617
load("//pkg/private/deb:deb.bzl", _pkg_deb = "pkg_deb")

pkg/private/pkg_files.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,7 @@ def add_from_default_info(
394394
data_path: path to package
395395
data_path_without_prefix: path to the package after prefix stripping
396396
include_runfiles: Include runfiles
397+
workspace_name: name of the main workspace
397398
"""
398399
if not DefaultInfo in src:
399400
return

pkg/rpm.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def pkg_rpm(name, srcs = None, spec_file = None, subrpms = None, **kwargs):
4949
name: rule name
5050
srcs: pkg_rpm_pfg `srcs` attribute
5151
spec_file: pkg_rpm_legacy `spec_file` attribute
52+
subrpms: pkg_rpm_pfg `subrpms` attribute
5253
**kwargs: arguments to either `pkg_rpm_pfg` or `pkg_rpm_legacy`,
5354
depending on mode
5455

tests/mappings/mappings_test.bzl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ def _pkg_files_contents_test_impl(ctx):
6060

6161
expected_dests = {e: None for e in ctx.attr.expected_dests}
6262
actual_dests = target_under_test[PackageFilesInfo].dest_src_map.keys()
63-
n_found = 0
6463

6564
for actual in actual_dests:
6665
asserts.true(

0 commit comments

Comments
 (0)