mirror of
https://github.com/nlohmann/json
synced 2024-11-22 12:00:05 +00:00
Use official Clang/GCC containers (#3703)
This commit is contained in:
parent
4c8cdd7afc
commit
f7973f46d6
@ -33,6 +33,7 @@ Checks: '*,
|
|||||||
-llvm-header-guard,
|
-llvm-header-guard,
|
||||||
-llvm-include-order,
|
-llvm-include-order,
|
||||||
-llvmlibc-*,
|
-llvmlibc-*,
|
||||||
|
-misc-confusable-identifiers,
|
||||||
-misc-no-recursion,
|
-misc-no-recursion,
|
||||||
-misc-non-private-member-variables-in-classes,
|
-misc-non-private-member-variables-in-classes,
|
||||||
-modernize-concat-nested-namespaces,
|
-modernize-concat-nested-namespaces,
|
||||||
|
70
.github/workflows/ubuntu.yml
vendored
70
.github/workflows/ubuntu.yml
vendored
@ -16,9 +16,13 @@ concurrency:
|
|||||||
jobs:
|
jobs:
|
||||||
ci_test_clang:
|
ci_test_clang:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
container: silkeh/clang:dev
|
||||||
steps:
|
steps:
|
||||||
|
- name: Install git
|
||||||
|
run: apt-get update ; apt-get install -y git
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
@ -39,7 +43,7 @@ jobs:
|
|||||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_clang_tidy, ci_cppcheck, ci_test_valgrind, ci_test_clang_sanitizer, ci_test_amalgamation, ci_clang_analyze, ci_cpplint, ci_cmake_flags, ci_single_binaries, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata, ci_infer]
|
target: [ci_cppcheck, ci_test_valgrind, ci_test_amalgamation, ci_test_single_header, ci_single_binaries, ci_infer]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
@ -47,24 +51,46 @@ jobs:
|
|||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ${{ matrix.target }}
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci_test_single_header:
|
ci_static_analysis_ubuntu:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [ci_cpplint, ci_cmake_flags, ci_reproducible_tests, ci_non_git_tests, ci_offline_testdata]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cmake --build build --target ci_test_single_header
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
ci_static_analysis_clang:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: silkeh/clang:dev
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
target: [ci_clang_tidy, ci_test_clang_sanitizer, ci_clang_analyze]
|
||||||
|
steps:
|
||||||
|
- name: Install git
|
||||||
|
run: apt-get update ; apt-get install -y git
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --target ${{ matrix.target }}
|
||||||
|
|
||||||
ci_cmake_options:
|
ci_cmake_options:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
|
target: [ci_test_diagnostics, ci_test_noexceptions, ci_test_noimplicitconversions, ci_test_legacycomparison, ci_test_noglobaludls]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
run: cmake -S . -B build -DJSON_CI=On
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
- name: Build
|
- name: Build
|
||||||
@ -90,12 +116,42 @@ jobs:
|
|||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
|
path-to-lcov: ${{ github.workspace }}/build/json.info.filtered.noexcept
|
||||||
|
|
||||||
|
ci_test_compilers_gcc:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
compiler: ['4', '5', '6', '7', '8', '9', '10', '11', '12', 'latest']
|
||||||
|
container: gcc:${{ matrix.compiler }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --target ci_test_compiler_default
|
||||||
|
|
||||||
|
ci_test_compilers_clang:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
compiler: ['3.5', '3.6', '3.7', '3.8', '3.9', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', 'latest']
|
||||||
|
container: silkeh/clang:${{ matrix.compiler }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Get latest CMake and ninja
|
||||||
|
uses: lukka/get-cmake@latest
|
||||||
|
- name: Run CMake
|
||||||
|
run: cmake -S . -B build -DJSON_CI=On
|
||||||
|
- name: Build
|
||||||
|
run: cmake --build build --target ci_test_compiler_default
|
||||||
|
|
||||||
ci_test_compilers:
|
ci_test_compilers:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
container: ghcr.io/nlohmann/json-ci:v2.4.0
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
compiler: [g++-4.8, g++-4.9, g++-5, g++-6, g++-7, g++-8, g++-9, g++-10, g++-11, clang++-3.5, clang++-3.6, clang++-3.7, clang++-3.8, clang++-3.9, clang++-4.0, clang++-5.0, clang++-6.0, clang++-7, clang++-8, clang++-9, clang++-10, clang++-11, clang++-12, clang++-13, clang++-14]
|
compiler: [g++-4.8]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- name: Run CMake
|
- name: Run CMake
|
||||||
|
@ -27,10 +27,6 @@ Files: tools/amalgamate/*
|
|||||||
Copyright: 2012 Erik Edlund <erik.edlund@32767.se>
|
Copyright: 2012 Erik Edlund <erik.edlund@32767.se>
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
|
|
||||||
Files: tools/cpplint/*
|
|
||||||
Copyright: 2009 Google Inc. All rights reserved.
|
|
||||||
License: BSD-3-Clause
|
|
||||||
|
|
||||||
Files: tools/gdb_pretty_printer
|
Files: tools/gdb_pretty_printer
|
||||||
Copyright: 2020 Hannes Domani <https://github.com/ssbssa>
|
Copyright: 2020 Hannes Domani <https://github.com/ssbssa>
|
||||||
License: MIT
|
License: MIT
|
||||||
|
53
README.md
53
README.md
@ -1152,39 +1152,40 @@ The following compilers are currently used in continuous integration at [AppVeyo
|
|||||||
| Apple Clang 13.0.0 (clang-1300.0.29.30); Xcode 13.2.1 | macOS 12.4 | GitHub Actions |
|
| Apple Clang 13.0.0 (clang-1300.0.29.30); Xcode 13.2.1 | macOS 12.4 | GitHub Actions |
|
||||||
| Apple Clang 13.1.6 (clang-1316.0.21.2.3); Xcode 13.3.1 | macOS 12.4 | GitHub Actions |
|
| Apple Clang 13.1.6 (clang-1316.0.21.2.3); Xcode 13.3.1 | macOS 12.4 | GitHub Actions |
|
||||||
| Apple Clang 13.1.6 (clang-1316.0.21.2.5); Xcode 13.4.1 | macOS 12.4 | GitHub Actions |
|
| Apple Clang 13.1.6 (clang-1316.0.21.2.5); Xcode 13.4.1 | macOS 12.4 | GitHub Actions |
|
||||||
| Clang 3.5.2 (3.5.2-3ubuntu1) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 3.5.2 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 3.6.2 (3.6.2-3ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 3.6.2 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 3.7.1 (3.7.1-2ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 3.7.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 3.8.0 (3.8.0-2ubuntu4) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 3.8.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 3.9.1 (3.9.1-4ubuntu3\~16.04.2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 3.9.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 4.0.0 (4.0.0-1ubuntu1\~16.04.2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 4.0.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 5.0.0 (5.0.0-3\~16.04.1) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 5.0.2 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 6.0.1 (6.0.1-14) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 6.0.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 7.0.1 (7.0.1-12) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 7.0.1 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 8.0.1 (8.0.1-9) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 8.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 9.0.1 (9.0.1-12) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 9.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 10.0.0 (10.0.0-4ubuntu1) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 10.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 10.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
|
| Clang 10.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
|
||||||
| Clang 11.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
|
| Clang 11.0.0 with GNU-like command-line | Windows-10.0.17763 | GitHub Actions |
|
||||||
| Clang 11.0.0 with MSVC-like command-line | Windows-10.0.17763 | GitHub Actions |
|
| Clang 11.0.0 with MSVC-like command-line | Windows-10.0.17763 | GitHub Actions |
|
||||||
| Clang 11.0.0 (11.0.0-2~ubuntu20.04.1) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 11.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 12.0.0 (12.0.0-3ubuntu1~20.04.3) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 12.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 13.0.1 (13.0.1-++20211015123032+cf15ccdeb6d5-1exp120211015003613.5) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 13.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 14.0.5-++20220603124341+2f0a69c32a4c-1~exp1~20220603124352.149 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 14.0.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Clang 15.0.0 (15.0.0-++20220530052901+b7d2b160c3ba-1~exp1~20220530172952.268) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Clang 15.0.0 (15.0.0-++20220719071818+5fc621355110-1~exp1~20220719071918.324) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 4.8.5 (Ubuntu 4.8.5-4ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 4.8.5 (Ubuntu 4.8.5-4ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 4.9.3 (Ubuntu 4.9.3-13ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 4.9.4 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.12) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 5.5.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 6.4.0 (Ubuntu 6.4.0-17ubuntu1) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 6.5.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 7.5.0 (Ubuntu 7.5.0-6ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 7.5.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project) | Windows-10.0.17763 | GitHub Actions |
|
| GCC 8.1.0 (i686-posix-dwarf-rev0, Built by MinGW-W64 project) | Windows-10.0.17763 | GitHub Actions |
|
||||||
| GCC 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) | Windows-10.0.17763 | GitHub Actions |
|
| GCC 8.1.0 (x86_64-posix-seh-rev0, Built by MinGW-W64 project) | Windows-10.0.17763 | GitHub Actions |
|
||||||
| GCC 8.4.0 (Ubuntu 8.4.0-3ubuntu2) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 8.5.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 9.5.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 10.2.0 (Ubuntu 10.2.0-5ubuntu1~20.04) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 10.4.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 11.1.0 | Ubuntu (aarch64) | Drone CI |
|
| GCC 11.1.0 | Ubuntu (aarch64) | Drone CI |
|
||||||
| GCC 11.1.0 (Ubuntu 11.1.0-1ubuntu1~20.04) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 11.3.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| GCC 13.0.0 13.0.0 20220605 (experimental) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| GCC 12.2.0 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
|
| GCC 13.0.0 20220605 (experimental) | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Intel C++ Compiler 2021.5.0.20211109 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| Intel C++ Compiler 2021.5.0.20211109 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| NVCC 11.0.221 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
| NVCC 11.0.221 | Ubuntu 20.04.3 LTS | GitHub Actions |
|
||||||
| Visual Studio 14 2015 MSVC 19.0.24241.7 (Build Engine version 14.0.25420.1) | Windows-6.3.9600 | AppVeyor |
|
| Visual Studio 14 2015 MSVC 19.0.24241.7 (Build Engine version 14.0.25420.1) | Windows-6.3.9600 | AppVeyor |
|
||||||
|
@ -13,7 +13,7 @@ execute_process(COMMAND ${ASTYLE_TOOL} --version OUTPUT_VARIABLE ASTYLE_TOOL_VER
|
|||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ASTYLE_TOOL_VERSION "${ASTYLE_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" ASTYLE_TOOL_VERSION "${ASTYLE_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Artistic Style ${ASTYLE_TOOL_VERSION} (${ASTYLE_TOOL})")
|
message(STATUS "🔖 Artistic Style ${ASTYLE_TOOL_VERSION} (${ASTYLE_TOOL})")
|
||||||
|
|
||||||
find_program(CLANG_TOOL NAMES clang++-HEAD clang++-15 clang++-14 clang++-13 clang++-12 clang++-11 clang++)
|
find_program(CLANG_TOOL NAMES clang++-HEAD clang++-16 clang++-15 clang++-14 clang++-13 clang++-12 clang++-11 clang++)
|
||||||
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
|
execute_process(COMMAND ${CLANG_TOOL} --version OUTPUT_VARIABLE CLANG_TOOL_VERSION ERROR_VARIABLE CLANG_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CLANG_TOOL_VERSION "${CLANG_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
|
message(STATUS "🔖 Clang ${CLANG_TOOL_VERSION} (${CLANG_TOOL})")
|
||||||
@ -30,7 +30,7 @@ execute_process(COMMAND ${CPPCHECK_TOOL} --version OUTPUT_VARIABLE CPPCHECK_TOOL
|
|||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CPPCHECK_TOOL_VERSION "${CPPCHECK_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" CPPCHECK_TOOL_VERSION "${CPPCHECK_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 Cppcheck ${CPPCHECK_TOOL_VERSION} (${CPPCHECK_TOOL})")
|
message(STATUS "🔖 Cppcheck ${CPPCHECK_TOOL_VERSION} (${CPPCHECK_TOOL})")
|
||||||
|
|
||||||
find_program(GCC_TOOL NAMES g++-latest g++-HEAD g++-11 g++-10)
|
find_program(GCC_TOOL NAMES g++-latest g++-HEAD g++-12 g++-11 g++-10)
|
||||||
execute_process(COMMAND ${GCC_TOOL} --version OUTPUT_VARIABLE GCC_TOOL_VERSION ERROR_VARIABLE GCC_TOOL_VERSION)
|
execute_process(COMMAND ${GCC_TOOL} --version OUTPUT_VARIABLE GCC_TOOL_VERSION ERROR_VARIABLE GCC_TOOL_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCC_TOOL_VERSION "${GCC_TOOL_VERSION}")
|
string(REGEX MATCH "[0-9]+(\\.[0-9]+)+" GCC_TOOL_VERSION "${GCC_TOOL_VERSION}")
|
||||||
message(STATUS "🔖 GCC ${GCC_TOOL_VERSION} (${GCC_TOOL})")
|
message(STATUS "🔖 GCC ${GCC_TOOL_VERSION} (${GCC_TOOL})")
|
||||||
@ -667,8 +667,11 @@ add_custom_target(ci_cppcheck
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
add_custom_target(ci_cpplint
|
add_custom_target(ci_cpplint
|
||||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_SOURCE_DIR}/tools/cpplint/cpplint.py --filter=-whitespace,-legal,-runtime/references,-runtime/explicit,-runtime/indentation_namespace,-readability/casting,-readability/nolint --quiet --recursive ${SRC_FILES}
|
COMMAND ${Python3_EXECUTABLE} -mvenv venv_cpplint
|
||||||
|
COMMAND venv_cpplint/bin/pip3 --quiet install cpplint
|
||||||
|
COMMAND venv_cpplint/bin/cpplint --filter=-whitespace,-legal,-runtime/references,-runtime/explicit,-runtime/indentation_namespace,-readability/casting,-readability/nolint --quiet --recursive ${SRC_FILES}
|
||||||
COMMENT "Check code with cpplint"
|
COMMENT "Check code with cpplint"
|
||||||
|
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@ -929,6 +932,17 @@ foreach(COMPILER g++-4.8 g++-4.9 g++-5 g++-6 g++-7 g++-8 g++-9 g++-10 g++-11 cla
|
|||||||
unset(COMPILER_TOOL CACHE)
|
unset(COMPILER_TOOL CACHE)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
|
add_custom_target(ci_test_compiler_default
|
||||||
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
-DCMAKE_BUILD_TYPE=Debug -GNinja
|
||||||
|
-DJSON_BuildTests=ON -DJSON_FastTests=ON
|
||||||
|
-S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_compiler_default
|
||||||
|
${ADDITIONAL_FLAGS}
|
||||||
|
COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_compiler_default --parallel ${N}
|
||||||
|
COMMAND cd ${PROJECT_BINARY_DIR}/build_compiler_default && ${CMAKE_CTEST_COMMAND} --parallel ${N} --exclude-regex "test-unicode" -LE git_required --output-on-failure
|
||||||
|
COMMENT "Compile and test with default C++ compiler"
|
||||||
|
)
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
# CUDA example
|
# CUDA example
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
@ -219,11 +219,11 @@ namespace std
|
|||||||
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||||
#endif
|
#endif
|
||||||
template<typename IteratorType>
|
template<typename IteratorType>
|
||||||
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> // NOLINT(cert-dcl58-cpp)
|
||||||
: public std::integral_constant<std::size_t, 2> {};
|
: public std::integral_constant<std::size_t, 2> {};
|
||||||
|
|
||||||
template<std::size_t N, typename IteratorType>
|
template<std::size_t N, typename IteratorType>
|
||||||
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> // NOLINT(cert-dcl58-cpp)
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using type = decltype(
|
using type = decltype(
|
||||||
|
@ -5160,7 +5160,7 @@ namespace std // NOLINT(cert-dcl58-cpp)
|
|||||||
/// @brief hash value for JSON objects
|
/// @brief hash value for JSON objects
|
||||||
/// @sa https://json.nlohmann.me/api/basic_json/std_hash/
|
/// @sa https://json.nlohmann.me/api/basic_json/std_hash/
|
||||||
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
||||||
struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>
|
struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL> // NOLINT(cert-dcl58-cpp)
|
||||||
{
|
{
|
||||||
std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const
|
std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const
|
||||||
{
|
{
|
||||||
@ -5193,7 +5193,7 @@ struct less< ::nlohmann::detail::value_t> // do not remove the space after '<',
|
|||||||
/// @brief exchanges the values of two JSON objects
|
/// @brief exchanges the values of two JSON objects
|
||||||
/// @sa https://json.nlohmann.me/api/basic_json/std_swap/
|
/// @sa https://json.nlohmann.me/api/basic_json/std_swap/
|
||||||
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
||||||
inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name)
|
inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp)
|
||||||
is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&& // NOLINT(misc-redundant-expression)
|
is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&& // NOLINT(misc-redundant-expression)
|
||||||
is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)
|
is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)
|
||||||
{
|
{
|
||||||
|
@ -5297,11 +5297,11 @@ namespace std
|
|||||||
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
#pragma clang diagnostic ignored "-Wmismatched-tags"
|
||||||
#endif
|
#endif
|
||||||
template<typename IteratorType>
|
template<typename IteratorType>
|
||||||
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>>
|
class tuple_size<::nlohmann::detail::iteration_proxy_value<IteratorType>> // NOLINT(cert-dcl58-cpp)
|
||||||
: public std::integral_constant<std::size_t, 2> {};
|
: public std::integral_constant<std::size_t, 2> {};
|
||||||
|
|
||||||
template<std::size_t N, typename IteratorType>
|
template<std::size_t N, typename IteratorType>
|
||||||
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >>
|
class tuple_element<N, ::nlohmann::detail::iteration_proxy_value<IteratorType >> // NOLINT(cert-dcl58-cpp)
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using type = decltype(
|
using type = decltype(
|
||||||
@ -24338,7 +24338,7 @@ namespace std // NOLINT(cert-dcl58-cpp)
|
|||||||
/// @brief hash value for JSON objects
|
/// @brief hash value for JSON objects
|
||||||
/// @sa https://json.nlohmann.me/api/basic_json/std_hash/
|
/// @sa https://json.nlohmann.me/api/basic_json/std_hash/
|
||||||
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
||||||
struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL>
|
struct hash<nlohmann::NLOHMANN_BASIC_JSON_TPL> // NOLINT(cert-dcl58-cpp)
|
||||||
{
|
{
|
||||||
std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const
|
std::size_t operator()(const nlohmann::NLOHMANN_BASIC_JSON_TPL& j) const
|
||||||
{
|
{
|
||||||
@ -24371,7 +24371,7 @@ struct less< ::nlohmann::detail::value_t> // do not remove the space after '<',
|
|||||||
/// @brief exchanges the values of two JSON objects
|
/// @brief exchanges the values of two JSON objects
|
||||||
/// @sa https://json.nlohmann.me/api/basic_json/std_swap/
|
/// @sa https://json.nlohmann.me/api/basic_json/std_swap/
|
||||||
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
NLOHMANN_BASIC_JSON_TPL_DECLARATION
|
||||||
inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name)
|
inline void swap(nlohmann::NLOHMANN_BASIC_JSON_TPL& j1, nlohmann::NLOHMANN_BASIC_JSON_TPL& j2) noexcept( // NOLINT(readability-inconsistent-declaration-parameter-name, cert-dcl58-cpp)
|
||||||
is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&& // NOLINT(misc-redundant-expression)
|
is_nothrow_move_constructible<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value&& // NOLINT(misc-redundant-expression)
|
||||||
is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)
|
is_nothrow_move_assignable<nlohmann::NLOHMANN_BASIC_JSON_TPL>::value)
|
||||||
{
|
{
|
||||||
|
2
tests/thirdparty/fifo_map/fifo_map.hpp
vendored
2
tests/thirdparty/fifo_map/fifo_map.hpp
vendored
@ -520,7 +520,7 @@ template <
|
|||||||
namespace std // NOLINT(cert-dcl58-cpp,-warnings-as-errors)
|
namespace std // NOLINT(cert-dcl58-cpp,-warnings-as-errors)
|
||||||
{
|
{
|
||||||
template <class Key, class T, class Compare, class Allocator>
|
template <class Key, class T, class Compare, class Allocator>
|
||||||
inline void swap(nlohmann::fifo_map<Key, T, Compare, Allocator>& m1,
|
inline void swap(nlohmann::fifo_map<Key, T, Compare, Allocator>& m1, // NOLINT(cert-dcl58-cpp)
|
||||||
nlohmann::fifo_map<Key, T, Compare, Allocator>& m2)
|
nlohmann::fifo_map<Key, T, Compare, Allocator>& m2)
|
||||||
{
|
{
|
||||||
m1.swap(m2);
|
m1.swap(m2);
|
||||||
|
@ -1,79 +0,0 @@
|
|||||||
cpplint - static code checker for C++
|
|
||||||
=====================================
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/v/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/pyversions/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/status/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/l/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/dd/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/dw/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
.. image:: https://img.shields.io/pypi/dm/cpplint.svg
|
|
||||||
:target: https://pypi.python.org/pypi/cpplint
|
|
||||||
|
|
||||||
Cpplint is a command-line tool to check C/C++ files for style issues following `Google's C++ style guide <http://google.github.io/styleguide/cppguide.html>`_.
|
|
||||||
Cpplint is developed and maintained by Google Inc. at `google/styleguide <https://github.com/google/styleguide>`_, also see the `wikipedia entry <http://en.wikipedia.org/wiki/Cpplint>`_
|
|
||||||
|
|
||||||
While Google maintains cpplint, Google is not (very) responsive to issues and pull requests, this fork aims to be (somewhat) more open to add fixes to cpplint to enable fixes, when those fixes make cpplint usable in wider contexts.
|
|
||||||
Also see discussion here https://github.com/google/styleguide/pull/528.
|
|
||||||
|
|
||||||
|
|
||||||
Installation
|
|
||||||
============
|
|
||||||
|
|
||||||
|
|
||||||
To install cpplint from PyPI, run:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ pip install cpplint
|
|
||||||
|
|
||||||
Then run it with:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ cpplint [OPTIONS] files
|
|
||||||
|
|
||||||
For full usage instructions, run:
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
$ cpplint --help
|
|
||||||
|
|
||||||
Changes
|
|
||||||
-------
|
|
||||||
|
|
||||||
The modifications in this fork are minor fixes and cosmetic changes, such as:
|
|
||||||
|
|
||||||
* python 3 compatibility
|
|
||||||
* more default file extensions
|
|
||||||
* customizable file extensions with the --extensions argument
|
|
||||||
* continuous integration on github
|
|
||||||
* support for recursive file discovery via the --recursive argument
|
|
||||||
* support for excluding files via --exclude
|
|
||||||
* JUnit XML output format
|
|
||||||
* Overriding repository root auto-detection via --repository
|
|
||||||
* Support ``#pragma once`` as an alternative to header include guards
|
|
||||||
* ... and a few more (most of which are open PRs on upstream)
|
|
||||||
|
|
||||||
|
|
||||||
Acknowledgements
|
|
||||||
----------------
|
|
||||||
|
|
||||||
Thanks to Google Inc. for open-sourcing their in-house tool.
|
|
||||||
Thanks to maintainers of the fork
|
|
||||||
|
|
||||||
* `tkruse <https://github.com/tkruse>`_
|
|
||||||
* `mattyclarkson <https://github.com/mattyclarkson>`_
|
|
||||||
* `theandrewdavis <https://github.com/theandrewdavis>`_
|
|
6909
tools/cpplint/cpplint.py
vendored
6909
tools/cpplint/cpplint.py
vendored
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
wget -N https://raw.githubusercontent.com/cpplint/cpplint/master/cpplint.py
|
|
||||||
wget -N https://raw.githubusercontent.com/cpplint/cpplint/master/README.rst
|
|
Loading…
Reference in New Issue
Block a user