Skip to content

Commit

Permalink
Fix api-linter errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
SanjayVas committed Jun 6, 2023
1 parent fc4d34b commit ecb711b
Show file tree
Hide file tree
Showing 54 changed files with 1,260 additions and 497 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/api-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Copyright 2023 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# TODO(world-federation-of-advertisers/actions#40): Use lint action once it runs
# api-linter.

name: API lint

on:
pull_request:
branches: [main]
types: [opened, synchronize, edited]

jobs:
lint:
name: API lint
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3

- name: Set up api-linter
env:
VERSION: 1.48.0
run: |
cd ~
curl -L "https://github.com/googleapis/api-linter/releases/download/v${VERSION}/api-linter-${VERSION}-linux-amd64.tar.gz" -o api-linter.tar.gz
mkdir -p ~/.local/bin
tar -xf api-linter.tar.gz -C ~/.local/bin
- env:
BAZEL: bazelisk
run: tools/api-lint
23 changes: 23 additions & 0 deletions src/main/proto/api-linter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2022 The Cross-Media Measurement Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- included_paths:
- 'wfa/measurement/api/v2alpha/**/*.proto'
disabled_rules:
- 'core::0191::java-package'
- 'core::0127::http-annotation'
- 'core::0133::http-uri-parent'
- 'core::0146::any'
- 'core::0133::request-id-field'
- 'core::0121::resource-must-support-get'
Loading

0 comments on commit ecb711b

Please sign in to comment.