Skip to content

Commit

Permalink
Fix trailing whitespaces (#3205)
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik authored Feb 9, 2025
1 parent 1455924 commit a8f4f70
Show file tree
Hide file tree
Showing 297 changed files with 10,307 additions and 10,321 deletions.
26 changes: 13 additions & 13 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
---
Checks: [
android-*,
android-*,
boost-*,
bugprone-*,
clang-analyzer-core*,
clang-analyzer-cplusplus*,
clang-analyzer-deadcode*,
clang-analyzer-optin.cplusplus*,
clang-analyzer-optin.performance.Padding,
clang-analyzer-security*,
clang-analyzer-core*,
clang-analyzer-cplusplus*,
clang-analyzer-deadcode*,
clang-analyzer-optin.cplusplus*,
clang-analyzer-optin.performance.Padding,
clang-analyzer-security*,
clang-diagnostic-*,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-no-malloc,
google-*,
llvm-*,
misc-*,
modernize-*,
performance-*,
portability-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-bugprone-branch-clone,
-bugprone-easily-swappable-parameters,
Expand Down Expand Up @@ -118,6 +118,6 @@ Checks: [
]
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes
CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes
value: 'exception_ptr'
6 changes: 3 additions & 3 deletions .github/workflows/android-device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
((github.event.workflow_run.head_branch == 'main' && github.event.workflow_run.event == 'push') ||
matrix.test.name == 'Android Benchmark' && steps.benchmark_comment.outputs.comment-id ||
matrix.test.name != 'Android Benchmark')
run:
run:
echo "run_device_test=true" >> "$GITHUB_ENV"

- uses: LouisBrunner/[email protected]
Expand All @@ -135,7 +135,7 @@ jobs:
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}
role-duration-seconds: 14400

- name: Run ${{ matrix.test.name }} on AWS Device Farm
run: |
export name="${{ matrix.test.name }}"
Expand All @@ -160,7 +160,7 @@ jobs:
echo results_dir="$results_dir" >> "$GITHUB_ENV"
node scripts/aws-device-farm/store-test-artifacts.mjs --runArn ${{ env.run_arn }} --outputDir "$results_dir"
zip -r test_artifacts.zip "$results_dir"
- name: Store Benchmark Results
if: matrix.test.name == 'Android Benchmark' && env.run_device_test == 'true'
run: |
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/ios-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ on:
- ios-*.*.x
tags:
- 'ios-*'

pull_request:
branches:
- '*'
Expand All @@ -48,11 +48,11 @@ jobs:
files_yaml_from_source_file: .github/changed-files.yml

- name: Run step if test file(s) change
if: steps.changed-files-yaml.outputs.ios_any_modified == 'true'
if: steps.changed-files-yaml.outputs.ios_any_modified == 'true'
run: |
echo "One or more iOS file(s) has changed."
echo "List of changes: ${{ steps.changed-files-yaml.outputs.ios_all_changed_files }}"
ios-build:
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
${{ env.render_test_artifacts_dir }}/RenderTestApp.ipa
# C++ unit tests

- name: Build CppUnitTests .ipa and .xctest for AWS Device Farm
run: |
set -e
Expand Down Expand Up @@ -178,16 +178,16 @@ jobs:
platform/ios/MapLibre_dynamic
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}

- name: Upload MapLibre_DWARF & MapLibre_dynamic to S3
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
run: |
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
run: |
aws s3 cp MapLibre_DWARF s3://maplibre-native/size-test-ios/MapLibre_DWARF-main
aws s3 cp MapLibre_dynamic s3://maplibre-native/size-test-ios/MapLibre_dynamic-main
Expand Down Expand Up @@ -232,7 +232,7 @@ jobs:
bazel build --compilation_mode=opt --features=dead_strip,thin_lto --objc_enable_binary_stripping \
--apple_generate_dsym --output_groups=+dsyms --//:renderer=metal //platform/ios:MapLibre.dynamic --embed_label=maplibre_ios_"$(cat VERSION)"
echo xcframework="$(bazel info execution_root)"/"$(bazel cquery --output=files --compilation_mode=opt --//:renderer=metal //platform/ios:MapLibre.dynamic)" >> "$GITHUB_ENV"
- name: Create .zip with debug symbols
if: env.make_release
working-directory: ./bazel-bin/platform/ios/MapLibre.dynamic_dsyms
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/linux-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ jobs:
- name: Get all Linux files that have changed
if: github.event_name != 'workflow_dispatch'
id: changed-files

uses: tj-actions/changed-files@v45
with:
files_yaml_from_source_file: .github/changed-files.yml

- name: List changed files
if: steps.changed-files.outputs.linux_any_modified == 'true'
if: steps.changed-files.outputs.linux_any_modified == 'true'
run: |
echo "Changed file(s): ${{ steps.changed-files.outputs.linux_all_changed_files }}"
Expand Down Expand Up @@ -114,32 +114,32 @@ jobs:
# mbgl-render (used for size test) & mbgl-benchmark-runner

- name: Upload mbgl-render as artifact
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: mbgl-render
path: |
build/bin/mbgl-render
- name: Upload mbgl-benchmark-runner as artifact
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
if: matrix.renderer == 'drawable' && github.event_name == 'pull_request'
uses: actions/upload-artifact@v4
with:
name: mbgl-benchmark-runner
path: |
build/mbgl-benchmark-runner
- name: Configure AWS Credentials
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}

- name: Upload mbgl-render & mbgl-benchmark-runner to S3
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
run: |
if: matrix.renderer == 'drawable' && github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
run: |
aws s3 cp build/bin/mbgl-render s3://maplibre-native/mbgl-render-main
aws s3 cp build/mbgl-benchmark-runner s3://maplibre-native/mbgl-benchmark-runner-main
Expand Down Expand Up @@ -178,7 +178,7 @@ jobs:
name: render-test-result-${{ matrix.renderer }}
path: |
metrics/linux-${{ matrix.renderer }}.html
# expression tests

- run: chmod +x build/expression-test/mbgl-expression-test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/macos-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ jobs:
restore-keys: |
${{ runner.os }}-bazel-
path: ~/.cache/bazel

- name: Install dependencies
run: |
brew install bazelisk webp libuv webp icu4c jpeg-turbo glfw
brew link icu4c --force
- name: Build AppKit app, GLFW app, cache tool, render tool for macOS
run: bazel build //platform/macos/app:macos_app //platform/glfw:glfw_app //bin:cache_tool //bin:render_tool --//:renderer=metal

- name: Generate Xcode project for macOS
run: bazel run //platform/macos:xcodeproj --@rules_xcodeproj//xcodeproj:extra_common_flags="--//:renderer=metal"
16 changes: 8 additions & 8 deletions .github/workflows/macos-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: macos-release

on:
workflow_dispatch:

jobs:
build:
runs-on: macos-12
Expand All @@ -15,14 +15,14 @@ jobs:
defaults:
run:
working-directory: platform/ios
shell: bash
shell: bash

steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Install macos dependencies
run: |
brew list cmake || brew install cmake
Expand All @@ -46,33 +46,33 @@ jobs:
run: npm install

- name: Prepare ccache
run: ccache --clear
run: ccache --clear

- name: Cache ccache
uses: actions/cache@v4
env:
cache-name: ccache-v1
cache-name: ccache-v1
with:
path: ~/.ccache'
key: ${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}-${{ github.head_ref }}
restore-keys: |
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}-${{ github.sha }}
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}-${{ github.ref }}
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}
${{ env.cache-name }}-${{ runner.os }}-${{ github.job }}
- name: Clear ccache statistics
run: |
ccache --zero-stats
ccache --max-size=2G
ccache --show-stats
ccache --show-stats
- name: Install packaging dependencies
run: |
./platform/ios/scripts/install-packaging-dependencies.sh
- name: Build package
run: make xpackage

- name: Deploy package
run: make xdeploy
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ jobs:
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.29.2'

- name: cmake version
run: |
cmake --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.29.2'

- name: cmake version
run: |
cmake --version
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pr-bloaty-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ jobs:
run: bloaty/build/bloaty --debug-file MapLibre_DWARF --debug-file MapLibre_DWARF-main MapLibre_dynamic -n 0 -s vm -d compileunits -- MapLibre_dynamic-main > bloaty_diff.txt

- name: Configure AWS Credentials
if: vars.OIDC_AWS_ROLE_TO_ASSUME
if: vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pr-linux-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
run: bloaty/build/bloaty mbgl-render -- mbgl-render-legacy -n 0 -s vm -d compileunits > tlus_diff_legacy.txt

- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
run: python3 vendor/benchmark/tools/compare.py --no-color benchmarks ./mbgl-benchmark-runner-main ./mbgl-benchmark-runner --benchmark_filter='^[^A][^P][^I].*' > benchmark_out.txt

- name: Configure AWS Credentials
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
if: github.ref == 'refs/heads/main' && vars.OIDC_AWS_ROLE_TO_ASSUME
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
files_yaml_from_source_file: .github/changed-files.yml

- name: List changed files
if: steps.changed-files.outputs.windows_any_modified == 'true'
if: steps.changed-files.outputs.windows_any_modified == 'true'
run: |
Write-Host "Changed file(s): ${{ steps.changed-files.outputs.windows_all_changed_files }}"
Expand Down Expand Up @@ -149,7 +149,7 @@ jobs:
uses: github/codeql-action/analyze@v3
with:
category: "/language:cpp"

- name: Download Mesa3D
if: matrix.renderer != 'egl'
run: |
Expand Down Expand Up @@ -181,7 +181,7 @@ jobs:
if: matrix.renderer == 'vulkan'
run: |
reg add 'HKLM\Software\Khronos\Vulkan\Drivers' /f /v '${{ github.workspace }}\build\lvp_icd.x86_64.json' /t REG_DWORD /d 0
- name: Download and configure Vulkan
if: matrix.renderer == 'vulkan'
run: |
Expand All @@ -207,7 +207,7 @@ jobs:
name: render-test-result-${{ matrix.renderer }}
path: |
metrics/windows-${{ matrix.renderer == 'osmesa' && 'opengl' || matrix.renderer }}.html
# expression tests

- name: Run expression test
Expand Down
4 changes: 3 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ repos:
- id: check-yaml
args: [--allow-multiple-documents, --unsafe]
- id: end-of-file-fixer
- id: trailing-whitespace
# FIXME: these autogenerate files contain trailing whitespace. Need to fix generator.
exclude: 'platform/android/MapLibreAndroid/src/main/java/org/maplibre/android/(location/LocationIndicatorLayer|style/layers/PropertyFactory)\.java'
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
hooks:
Expand Down Expand Up @@ -35,4 +38,3 @@ repos:
ci:
# sometimes fails https://github.com/keith/pre-commit-buildifier/issues/13
skip: [buildifier]

2 changes: 1 addition & 1 deletion ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In the repository, core C++ code is contained in the `include` and `src` directo

## Platform specific code

Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform.
Code and build scripts belonging to platform SDKs are contained in the `platform` directory, which has subdirectories for each platform.

- `platform/darwin` and `platform/default` directories contain code shared by multiple platform SDKs.
- `platform/ios` and `platform/macos` - the SDKs for Apple's operating systems, forked from https://github.com/mapbox/mapbox-gl-native-ios/commit/a139216 (mapbox hosted both iOS and MacOS SDKs in the same project).
Expand Down
Loading

0 comments on commit a8f4f70

Please sign in to comment.