diff --git a/.github/workflows/MainDistributionPipeline.yml b/.github/workflows/MainDistributionPipeline.yml index 496d87c..162f506 100644 --- a/.github/workflows/MainDistributionPipeline.yml +++ b/.github/workflows/MainDistributionPipeline.yml @@ -31,3 +31,13 @@ jobs: duckdb_version: v1.3-ossivalis ci_tools_version: main deploy_latest: ${{ startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main' }} + + code-quality: + name: Code Quality + uses: duckdb/extension-ci-tools/.github/workflows/_extension_code_quality.yml@main + with: + extension_name: httpfs + duckdb_version: v1.3-ossivalis + ci_tools_version: main + extra_toolchains: 'python3' + format_checks: 'format;tidy' diff --git a/Makefile b/Makefile index c7db037..ff93844 100644 --- a/Makefile +++ b/Makefile @@ -8,3 +8,23 @@ CORE_EXTENSIONS='' # Include the Makefile from extension-ci-tools include extension-ci-tools/makefiles/duckdb_extension.Makefile + +#### Misc +format-check: + python3 duckdb/scripts/format.py --all --check --directories extension/httpfs test + +format: + python3 duckdb/scripts/format.py --all --fix --noconfirm --directories extension/httpfs test + +format-fix: + python3 duckdb/scripts/format.py --all --fix --noconfirm --directories extension/httpfs test + +format-main: + python3 duckdb/scripts/format.py main --fix --noconfirm --directories extension/httpfs test + +tidy-check: + mkdir -p ./build/tidy + cmake $(GENERATOR) $(BUILD_FLAGS) $(EXT_DEBUG_FLAGS) -DDISABLE_UNITY=1 -DCLANG_TIDY=1 -S $(DUCKDB_SRCDIR) -B build/tidy + cp duckdb/.clang-tidy build/tidy/.clang-tidy + cd build/tidy && python3 ../../duckdb/scripts/run-clang-tidy.py '$(PROJ_DIR)extension/httpfs/' -header-filter '$(PROJ_DIR)extension/httpfs/' -quiet ${TIDY_THREAD_PARAMETER} ${TIDY_BINARY_PARAMETER} ${TIDY_PERFORM_CHECKS} + diff --git a/extension/httpfs/httpfs.cpp b/extension/httpfs/httpfs.cpp index 20f85a6..6f2f16c 100644 --- a/extension/httpfs/httpfs.cpp +++ b/extension/httpfs/httpfs.cpp @@ -275,7 +275,8 @@ void TimestampToTimeT(timestamp_t timestamp, time_t &result) { HTTPFileHandle::HTTPFileHandle(FileSystem &fs, const OpenFileInfo &file, FileOpenFlags flags, unique_ptr params_p) : FileHandle(fs, file.path, flags), params(std::move(params_p)), http_params(params->Cast()), - flags(flags), length(0), force_full_download(false), buffer_available(0), buffer_idx(0), file_offset(0), buffer_start(0), buffer_end(0) { + flags(flags), length(0), force_full_download(false), buffer_available(0), buffer_idx(0), file_offset(0), + buffer_start(0), buffer_end(0) { // check if the handle has extended properties that can be set directly in the handle // if we have these properties we don't need to do a head request to obtain them later if (file.extended_info) { diff --git a/extension/httpfs/httpfs_client_wasm.cpp b/extension/httpfs/httpfs_client_wasm.cpp index aaa22bb..4095281 100644 --- a/extension/httpfs/httpfs_client_wasm.cpp +++ b/extension/httpfs/httpfs_client_wasm.cpp @@ -9,7 +9,7 @@ unique_ptr HTTPFSUtil::InitializeClient(HTTPParams &http_params, con unordered_map HTTPFSUtil::ParseGetParameters(const string &text) { unordered_map result; - //TODO: HTTPFSUtil::ParseGetParameters is currently not implemented + // TODO: HTTPFSUtil::ParseGetParameters is currently not implemented return result; } diff --git a/test/sql/secret/secret_aws.test b/test/sql/secret/secret_aws.test index 529c4bc..3949161 100644 --- a/test/sql/secret/secret_aws.test +++ b/test/sql/secret/secret_aws.test @@ -1,6 +1,6 @@ # name: test/sql/secret/secret_aws.test # description: Tests secret refreshing -# group: [secrets] +# group: [secret] require-env S3_TEST_SERVER_AVAILABLE 1 diff --git a/test/sql/secret/secret_refresh.test b/test/sql/secret/secret_refresh.test index 85c8738..fe59f62 100644 --- a/test/sql/secret/secret_refresh.test +++ b/test/sql/secret/secret_refresh.test @@ -1,6 +1,6 @@ # name: test/sql/secret/secret_refresh.test # description: Tests secret refreshing -# group: [secrets] +# group: [secret] require-env S3_TEST_SERVER_AVAILABLE 1 diff --git a/test/sql/secret/secret_refresh_attach.test b/test/sql/secret/secret_refresh_attach.test index c20881d..efe3b43 100644 --- a/test/sql/secret/secret_refresh_attach.test +++ b/test/sql/secret/secret_refresh_attach.test @@ -1,6 +1,6 @@ # name: test/sql/secret/secret_refresh_attach.test # description: Tests secret refreshing -# group: [secrets] +# group: [secret] require-env S3_TEST_SERVER_AVAILABLE 1 diff --git a/test/sql/secret/test_secret_type.test b/test/sql/secret/test_secret_type.test index 2024b2f..a143b98 100644 --- a/test/sql/secret/test_secret_type.test +++ b/test/sql/secret/test_secret_type.test @@ -1,6 +1,6 @@ # name: test/sql/secret/test_secret_type.test # description: Test the secret types added by this extension -# group: [httpfs] +# group: [secret] require httpfs