File tree Expand file tree Collapse file tree 4 files changed +47
-4
lines changed Expand file tree Collapse file tree 4 files changed +47
-4
lines changed Original file line number Diff line number Diff line change 3535 - name : Run soundness checks
3636 run : |
3737 ./dev/check-generated-code.sh
38+
39+ check-imports :
40+ name : Check imports have access level
41+ runs-on : ubuntu-latest
42+ steps :
43+ - name : Checkout repository
44+ uses : actions/checkout@v4
45+ with :
46+ persist-credentials : false
47+ - name : Mark the workspace as safe
48+ run : git config --global --add safe.directory ${GITHUB_WORKSPACE}
49+ - name : Check import access level
50+ run : |
51+ ./dev/check-imports.sh
Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17- import Synchronization
17+ private import Synchronization
1818
1919extension ServerContext {
2020 @TaskLocal
Original file line number Diff line number Diff line change 1515 */
1616
1717#if canImport(Darwin)
18- import Darwin
18+ private import Darwin
1919#elseif canImport(Glibc)
20- import Glibc
20+ private import Glibc
2121#elseif canImport(Musl)
22- import Musl
22+ private import Musl
2323#endif
2424
2525enum System {
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ # # Copyright 2025, gRPC Authors All rights reserved.
3+ # #
4+ # # Licensed under the Apache License, Version 2.0 (the "License");
5+ # # you may not use this file except in compliance with the License.
6+ # # You may obtain a copy of the License at
7+ # #
8+ # # http://www.apache.org/licenses/LICENSE-2.0
9+ # #
10+ # # Unless required by applicable law or agreed to in writing, software
11+ # # distributed under the License is distributed on an "AS IS" BASIS,
12+ # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ # # See the License for the specific language governing permissions and
14+ # # limitations under the License.
15+
16+ set -euo pipefail
17+
18+ log () { printf -- " ** %s\n" " $* " >&2 ; }
19+
20+ here=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
21+ root=" ${here} /.."
22+
23+ log " Checking all imports have an access level"
24+ if grep -r " ^import " --exclude-dir=" Documentation.docc" " ${root} /Sources" ; then
25+ # Matches are bad!
26+ exit 1
27+ else
28+ exit 0
29+ fi
You can’t perform that action at this time.
0 commit comments