This is an automated email from the ASF dual-hosted git repository.

lidavidm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-adbc.git


The following commit(s) were added to refs/heads/main by this push:
     new e3df6129b chore(c): Use meson format for auto formatting (#2720)
e3df6129b is described below

commit e3df6129bb684452ef3231e5bb1aff407cd4fc55
Author: William Ayd <william....@icloud.com>
AuthorDate: Mon Apr 21 20:08:03 2025 -0400

    chore(c): Use meson format for auto formatting (#2720)
---
 .pre-commit-config.yaml          |   6 ++
 c/driver/bigquery/meson.build    |  23 +++----
 c/driver/flightsql/meson.build   |  23 +++----
 c/driver/framework/meson.build   |   5 +-
 c/driver/postgresql/meson.build  |  12 +---
 c/driver/snowflake/meson.build   |  23 +++----
 c/driver/sqlite/meson.build      |  14 ++--
 c/meson.build                    |  28 +++++---
 glib/adbc-arrow-glib/meson.build | 140 ++++++++++++++++++---------------------
 glib/adbc-glib/meson.build       | 134 +++++++++++++++++++------------------
 glib/example/meson.build         |  22 +++---
 glib/example/vala/meson.build    |  48 ++++++--------
 glib/meson.build                 |  58 ++++++++--------
 13 files changed, 258 insertions(+), 278 deletions(-)

diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fd138759f..9289142cb 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -97,6 +97,12 @@ repos:
     rev: 8ae2bb65fe66458263d94711ae4ddd978faece00
     hooks:
     - id: vala-lint
+  - repo: https://github.com/trim21/pre-commit-mirror-meson
+    rev: 3fcd193f7ae6a5ae62cfcd21a1ac66347db7cb6b # v1.7.2
+    hooks:
+    - id: meson-fmt
+      files: 'meson.build'
+      args: ['--inplace']
   - repo: local
     hooks:
     - id: apache-rat
diff --git a/c/driver/bigquery/meson.build b/c/driver/bigquery/meson.build
index 7eee6bf78..ca1d41904 100644
--- a/c/driver/bigquery/meson.build
+++ b/c/driver/bigquery/meson.build
@@ -19,21 +19,21 @@
 golang = find_program('go')
 
 if build_machine.system() == 'windows'
-  prefix = ''
-  suffix = '.lib'
+    prefix = ''
+    suffix = '.lib'
 elif build_machine.system() == 'darwin'
-  prefix = 'lib'
-  suffix = '.dylib'
+    prefix = 'lib'
+    suffix = '.dylib'
 else
-  prefix = 'lib'
-  suffix = '.so'
+    prefix = 'lib'
+    suffix = '.so'
 endif
 
 adbc_driver_bigquery_name = prefix + 'adbc_driver_bigquery' + suffix
 adbc_driver_bigquery_lib = custom_target(
     'adbc_driver_bigquery',
     output: adbc_driver_bigquery_name,
-    command : [
+    command: [
         golang,
         'build',
         '-C',
@@ -43,8 +43,8 @@ adbc_driver_bigquery_lib = custom_target(
         '-o',
         meson.current_build_dir() + '/' + adbc_driver_bigquery_name,
     ],
-    install : true,
-    install_dir : '.',
+    install: true,
+    install_dir: '.',
 )
 
 pkg.generate(
@@ -60,10 +60,7 @@ if get_option('tests')
         'adbc-driver-bigquery-test',
         'bigquery_test.cc',
         include_directories: [root_dir, driver_dir],
-        link_with: [
-            adbc_common_lib,
-            adbc_driver_bigquery_lib
-        ],
+        link_with: [adbc_common_lib, adbc_driver_bigquery_lib],
         dependencies: [adbc_validation_dep],
     )
     test('adbc-driver-bigquery', exc)
diff --git a/c/driver/flightsql/meson.build b/c/driver/flightsql/meson.build
index cac24d5cf..bfdfe6165 100644
--- a/c/driver/flightsql/meson.build
+++ b/c/driver/flightsql/meson.build
@@ -19,21 +19,21 @@
 golang = find_program('go')
 
 if build_machine.system() == 'windows'
-  prefix = ''
-  suffix = '.lib'
+    prefix = ''
+    suffix = '.lib'
 elif build_machine.system() == 'darwin'
-  prefix = 'lib'
-  suffix = '.dylib'
+    prefix = 'lib'
+    suffix = '.dylib'
 else
-  prefix = 'lib'
-  suffix = '.so'
+    prefix = 'lib'
+    suffix = '.so'
 endif
 
 adbc_driver_flightsql_name = prefix + 'adbc_driver_flightsql' + suffix
 adbc_driver_flightsql_lib = custom_target(
     'adbc_driver_flightsql',
     output: adbc_driver_flightsql_name,
-    command : [
+    command: [
         golang,
         'build',
         '-C',
@@ -43,8 +43,8 @@ adbc_driver_flightsql_lib = custom_target(
         '-o',
         meson.current_build_dir() + '/' + adbc_driver_flightsql_name,
     ],
-    install : true,
-    install_dir : '.',
+    install: true,
+    install_dir: '.',
 )
 
 pkg.generate(
@@ -61,10 +61,7 @@ if get_option('tests')
         'dremio_flightsql_test.cc',
         'sqlite_flightsql_test.cc',
         include_directories: [include_dir, c_dir, driver_dir],
-        link_with: [
-            adbc_common_lib,
-            adbc_driver_flightsql_lib
-        ],
+        link_with: [adbc_common_lib, adbc_driver_flightsql_lib],
         dependencies: [adbc_validation_dep],
     )
     test('adbc-driver-flightsql', exc)
diff --git a/c/driver/framework/meson.build b/c/driver/framework/meson.build
index 08be53eac..9a59dfb74 100644
--- a/c/driver/framework/meson.build
+++ b/c/driver/framework/meson.build
@@ -17,10 +17,7 @@
 
 adbc_framework_lib = library(
     'adbc_driver_framework',
-    sources: [
-        'objects.cc',
-        'utility.cc',
-    ],
+    sources: ['objects.cc', 'utility.cc'],
     include_directories: [include_dir, c_dir],
     link_with: [adbc_common_lib],
     dependencies: [nanoarrow_dep, fmt_dep],
diff --git a/c/driver/postgresql/meson.build b/c/driver/postgresql/meson.build
index ac075417f..bd7309f57 100644
--- a/c/driver/postgresql/meson.build
+++ b/c/driver/postgresql/meson.build
@@ -45,17 +45,14 @@ if get_option('tests')
     postgres_tests = {
         'driver-postgresql': {
             'src_name': 'driver_postgresql',
-            'sources': [
-                'postgres_type_test.cc',
-                'postgresql_test.cc',
-            ]
+            'sources': ['postgres_type_test.cc', 'postgresql_test.cc'],
         },
         'driver-postgresql-copy': {
             'src_name': 'driver_postgresql_copy',
             'sources': [
                 'copy/postgres_copy_reader_test.cc',
                 'copy/postgres_copy_writer_test.cc',
-            ]
+            ],
         },
     }
 
@@ -64,10 +61,7 @@ if get_option('tests')
             'adbc-' + name + '-test',
             sources: conf['sources'],
             include_directories: [include_dir, driver_dir, c_dir],
-            link_with: [
-                adbc_common_lib,
-                adbc_postgres_driver_lib,
-            ],
+            link_with: [adbc_common_lib, adbc_postgres_driver_lib],
             dependencies: [libpq_dep, adbc_validation_dep],
         )
         test('adbc-' + name, exc)
diff --git a/c/driver/snowflake/meson.build b/c/driver/snowflake/meson.build
index 20a7d3c70..2904b92d5 100644
--- a/c/driver/snowflake/meson.build
+++ b/c/driver/snowflake/meson.build
@@ -19,21 +19,21 @@
 golang = find_program('go')
 
 if build_machine.system() == 'windows'
-  prefix = ''
-  suffix = '.lib'
+    prefix = ''
+    suffix = '.lib'
 elif build_machine.system() == 'darwin'
-  prefix = 'lib'
-  suffix = '.dylib'
+    prefix = 'lib'
+    suffix = '.dylib'
 else
-  prefix = 'lib'
-  suffix = '.so'
+    prefix = 'lib'
+    suffix = '.so'
 endif
 
 adbc_driver_snowflake_name = prefix + 'adbc_driver_snowflake' + suffix
 adbc_driver_snowflake_lib = custom_target(
     'adbc_driver_snowflake',
     output: adbc_driver_snowflake_name,
-    command : [
+    command: [
         golang,
         'build',
         '-C',
@@ -43,8 +43,8 @@ adbc_driver_snowflake_lib = custom_target(
         '-o',
         meson.current_build_dir() + '/' + adbc_driver_snowflake_name,
     ],
-    install : true,
-    install_dir : '.',
+    install: true,
+    install_dir: '.',
 )
 
 pkg.generate(
@@ -60,10 +60,7 @@ if get_option('tests')
         'adbc-driver-snowflake-test',
         'snowflake_test.cc',
         include_directories: [include_dir, c_dir, driver_dir],
-        link_with: [
-            adbc_common_lib,
-            adbc_driver_snowflake_lib,
-        ],
+        link_with: [adbc_common_lib, adbc_driver_snowflake_lib],
         dependencies: [adbc_validation_dep],
     )
     test('adbc-driver-snowflake', exc)
diff --git a/c/driver/sqlite/meson.build b/c/driver/sqlite/meson.build
index ad61f7e43..436f51b43 100644
--- a/c/driver/sqlite/meson.build
+++ b/c/driver/sqlite/meson.build
@@ -19,15 +19,12 @@ sqlite3_dep = dependency('sqlite3')
 
 time_t_size = meson.get_compiler('c').sizeof(
     'time_t',
-    prefix : '#include <sys/types.h>',
+    prefix: '#include <sys/types.h>',
 )
 
 adbc_sqlite3_driver_lib = library(
     'adbc_driver_sqlite',
-    sources: [
-        'sqlite.cc',
-        'statement_reader.c',
-    ],
+    sources: ['sqlite.cc', 'statement_reader.c'],
     include_directories: [include_dir, c_dir],
     link_with: [adbc_common_lib, adbc_framework_lib],
     dependencies: [nanoarrow_dep, fmt_dep, sqlite3_dep],
@@ -47,11 +44,8 @@ if get_option('tests')
         'adbc-driver-sqlite-test',
         sources: ['sqlite_test.cc'],
         include_directories: [include_dir, c_dir, driver_dir],
-        link_with: [
-            adbc_common_lib,
-            adbc_sqlite3_driver_lib,
-        ],
+        link_with: [adbc_common_lib, adbc_sqlite3_driver_lib],
         dependencies: [sqlite3_dep, adbc_validation_dep],
-        )
+    )
     test('adbc-driver-sqlite', exc)
 endif
diff --git a/c/meson.build b/c/meson.build
index d9d1af08c..b9411186c 100644
--- a/c/meson.build
+++ b/c/meson.build
@@ -17,7 +17,8 @@
 
 project(
     'arrow-adbc',
-    'c', 'cpp',
+    'c',
+    'cpp',
     version: '1.6.0-SNAPSHOT',
     license: 'Apache-2.0',
     meson_version: '>=1.3.0',
@@ -26,10 +27,14 @@ project(
         'c_std=c99',
         'warning_level=2',
         'cpp_std=c++17',
-    ]
+    ],
 )
 
-add_project_arguments('-Wno-int-conversion', '-Wno-unused-parameter', 
language: 'c')
+add_project_arguments(
+    '-Wno-int-conversion',
+    '-Wno-unused-parameter',
+    language: 'c',
+)
 add_project_arguments('-Wno-unused-parameter', '-Wno-reorder', language: 'cpp')
 
 c_dir = include_directories('.')
@@ -55,7 +60,10 @@ pkg = import('pkgconfig')
 
 if needs_driver_manager
     install_headers('include/adbc_driver_manager.h')
-    install_headers('include/arrow-adbc/adbc_driver_manager.h', subdir: 
'arrow-adbc')
+    install_headers(
+        'include/arrow-adbc/adbc_driver_manager.h',
+        subdir: 'arrow-adbc',
+    )
     subdir('driver_manager')
 endif
 
@@ -63,25 +71,25 @@ subdir('driver/common')
 subdir('driver/framework')
 
 if get_option('tests')
-  subdir('validation')
+    subdir('validation')
 endif
 
 if get_option('bigquery')
-  subdir('driver/bigquery')
+    subdir('driver/bigquery')
 endif
 
 if get_option('flightsql')
-  subdir('driver/flightsql')
+    subdir('driver/flightsql')
 endif
 
 if get_option('postgresql')
-  subdir('driver/postgresql')
+    subdir('driver/postgresql')
 endif
 
 if get_option('sqlite')
-  subdir('driver/sqlite')
+    subdir('driver/sqlite')
 endif
 
 if get_option('snowflake')
-  subdir('driver/snowflake')
+    subdir('driver/snowflake')
 endif
diff --git a/glib/adbc-arrow-glib/meson.build b/glib/adbc-arrow-glib/meson.build
index 578040390..38953d909 100644
--- a/glib/adbc-arrow-glib/meson.build
+++ b/glib/adbc-arrow-glib/meson.build
@@ -17,101 +17,89 @@
 # specific language governing permissions and limitations
 # under the License.
 
-sources = files(
-  'connection.c',
-  'statement.c',
-)
+sources = files('connection.c', 'statement.c')
 
-definition_headers = files(
-  'connection.h',
-  'statement.h',
-)
+definition_headers = files('connection.h', 'statement.h')
 
 version_h_conf = configuration_data()
 version_h_conf.set('GADBC_ARROW_VERSION', meson.project_version())
 version_h_conf.set('GADBC_ARROW_VERSION_MAJOR', version_major)
 version_h_conf.set('GADBC_ARROW_VERSION_MINOR', version_minor)
 version_h_conf.set('GADBC_ARROW_VERSION_MICRO', version_micro)
-version_h = configure_file(input: 'version.h.in',
-                           output: 'version.h',
-                           configuration: version_h_conf)
+version_h = configure_file(
+    input: 'version.h.in',
+    output: 'version.h',
+    configuration: version_h_conf,
+)
 headers += version_h
 
 headers = definition_headers
-headers += files(
-  'adbc-arrow-glib.h',
-)
+headers += files('adbc-arrow-glib.h')
 
-enums = gnome.mkenums_simple('enum-types',
-                             identifier_prefix: 'GADBCArrow',
-                             sources: definition_headers,
-                             symbol_prefix: 'gadbc_arrow')
+enums = gnome.mkenums_simple(
+    'enum-types',
+    identifier_prefix: 'GADBCArrow',
+    sources: definition_headers,
+    symbol_prefix: 'gadbc_arrow',
+)
 enums_header = enums[1]
 
 install_headers(headers, subdir: 'adbc-arrow-glib')
 
 
-dependencies = [
-  adbc_glib,
-  arrow_glib,
-]
-libadbc_arrow_glib = library('adbc-arrow-glib',
-                             c_args: '-DG_LOG_DOMAIN="ADBC-Arrow"',
-                             sources: sources + enums,
-                             install: true,
-                             dependencies: dependencies,
-                             include_directories: base_include_directories,
-                             soversion: so_version,
-                             version: library_version)
+dependencies = [adbc_glib, arrow_glib]
+libadbc_arrow_glib = library(
+    'adbc-arrow-glib',
+    c_args: '-DG_LOG_DOMAIN="ADBC-Arrow"',
+    sources: sources + enums,
+    install: true,
+    dependencies: dependencies,
+    include_directories: base_include_directories,
+    soversion: so_version,
+    version: library_version,
+)
 adbc_arrow_glib = \
-  declare_dependency(link_with: libadbc_arrow_glib,
-                     include_directories: base_include_directories,
-                     dependencies: dependencies,
-                     sources: enums_header)
+    declare_dependency(
+    link_with: libadbc_arrow_glib,
+    include_directories: base_include_directories,
+    dependencies: dependencies,
+    sources: enums_header,
+)
 
-pkgconfig.generate(libadbc_arrow_glib,
-                   description: 'Arrow GLib integration API for ADBC GLib',
-                   filebase: 'adbc-arrow-glib',
-                   name: 'ADBC Arrow GLib',
-                   requires: ['adbc-glib', 'arrow-glib'],
-                   variables: pkgconfig_variables,
-                   version: meson.project_version())
+pkgconfig.generate(
+    libadbc_arrow_glib,
+    description: 'Arrow GLib integration API for ADBC GLib',
+    filebase: 'adbc-arrow-glib',
+    name: 'ADBC Arrow GLib',
+    requires: ['adbc-glib', 'arrow-glib'],
+    variables: pkgconfig_variables,
+    version: meson.project_version(),
+)
 
 adbc_arrow_glib_gir = \
-  gnome.generate_gir(libadbc_arrow_glib,
-                     dependencies: [
-                       declare_dependency(sources: adbc_glib_gir),
-                       arrow_glib,
-                     ],
-                     export_packages: 'adbc-arrow-glib',
-                     extra_args: [
-                       '--warn-all',
-                     ],
-                     fatal_warnings: gi_fatal_warnings,
-                     header: 'adbc-arrow-glib/adbc-arrow-glib.h',
-                     identifier_prefix: 'GADBCArrow',
-                     includes: [
-                       'ADBC-1.0',
-                       'Arrow-1.0',
-                     ],
-                     install: true,
-                     namespace: 'ADBCArrow',
-                     nsversion: api_version,
-                     sources: sources + definition_headers + enums,
-                     symbol_prefix: 'gadbc_arrow')
+    gnome.generate_gir(
+    libadbc_arrow_glib,
+    dependencies: [declare_dependency(sources: adbc_glib_gir), arrow_glib],
+    export_packages: 'adbc-arrow-glib',
+    extra_args: ['--warn-all'],
+    fatal_warnings: gi_fatal_warnings,
+    header: 'adbc-arrow-glib/adbc-arrow-glib.h',
+    identifier_prefix: 'GADBCArrow',
+    includes: ['ADBC-1.0', 'Arrow-1.0'],
+    install: true,
+    namespace: 'ADBCArrow',
+    nsversion: api_version,
+    sources: sources + definition_headers + enums,
+    symbol_prefix: 'gadbc_arrow',
+)
 if generate_vapi
-  adbc_arrow_glib_vapi = \
-    gnome.generate_vapi('adbc-arrow-glib',
-                        gir_dirs: [
-                          arrow_glib.get_variable('girdir'),
-                        ],
-                        install: true,
-                        packages: [
-                          adbc_glib_vapi,
-                          'arrow-glib',
-                        ],
-                        sources: [adbc_arrow_glib_gir[0]],
-                        vapi_dirs: [
-                          arrow_glib.get_variable('vapidir'),
-                        ])
+    adbc_arrow_glib_vapi = \
+    gnome.generate_vapi(
+        'adbc-arrow-glib',
+        gir_dirs: [arrow_glib.get_variable('girdir')],
+        install: true,
+        packages: [adbc_glib_vapi, 'arrow-glib'],
+        sources: [adbc_arrow_glib_gir[0]],
+        vapi_dirs: [arrow_glib.get_variable('vapidir')],
+    )
 endif
diff --git a/glib/adbc-glib/meson.build b/glib/adbc-glib/meson.build
index 60d892ff3..c59e15a9a 100644
--- a/glib/adbc-glib/meson.build
+++ b/glib/adbc-glib/meson.build
@@ -17,18 +17,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-sources = files(
-  'connection.c',
-  'database.c',
-  'error.c',
-  'statement.c',
-)
+sources = files('connection.c', 'database.c', 'error.c', 'statement.c')
 
 definition_headers = files(
-  'connection.h',
-  'database.h',
-  'error.h',
-  'statement.h',
+    'connection.h',
+    'database.h',
+    'error.h',
+    'statement.h',
 )
 
 version_h_conf = configuration_data()
@@ -36,75 +31,82 @@ version_h_conf.set('GADBC_VERSION', meson.project_version())
 version_h_conf.set('GADBC_VERSION_MAJOR', version_major)
 version_h_conf.set('GADBC_VERSION_MINOR', version_minor)
 version_h_conf.set('GADBC_VERSION_MICRO', version_micro)
-version_h = configure_file(input: 'version.h.in',
-                           output: 'version.h',
-                           configuration: version_h_conf)
+version_h = configure_file(
+    input: 'version.h.in',
+    output: 'version.h',
+    configuration: version_h_conf,
+)
 definition_headers += version_h
 
 headers = definition_headers
 headers += files(
-  'adbc-glib-raw.h',
-  'adbc-glib.h',
-  'connection-raw.h',
-  'database-raw.h',
-  'error-raw.h',
-  'statement-raw.h',
+    'adbc-glib-raw.h',
+    'adbc-glib.h',
+    'connection-raw.h',
+    'database-raw.h',
+    'error-raw.h',
+    'statement-raw.h',
 )
 
-enums = gnome.mkenums_simple('enum-types',
-                             identifier_prefix: 'GADBC',
-                             sources: definition_headers,
-                             symbol_prefix: 'gadbc')
+enums = gnome.mkenums_simple(
+    'enum-types',
+    identifier_prefix: 'GADBC',
+    sources: definition_headers,
+    symbol_prefix: 'gadbc',
+)
 enums_header = enums[1]
 
 install_headers(headers, subdir: project_include_sub_dir)
 
 
 gobject = dependency('gobject-2.0')
-dependencies = [
-  adbc_driver_manager,
-  gobject,
-]
-libadbc_glib = library('adbc-glib',
-                       c_args: '-DG_LOG_DOMAIN="ADBC"',
-                       sources: sources + enums,
-                       install: true,
-                       dependencies: dependencies,
-                       include_directories: base_include_directories,
-                       soversion: so_version,
-                       version: library_version)
-adbc_glib = declare_dependency(link_with: libadbc_glib,
-                               include_directories: base_include_directories,
-                               dependencies: dependencies,
-                               sources: enums_header)
+dependencies = [adbc_driver_manager, gobject]
+libadbc_glib = library(
+    'adbc-glib',
+    c_args: '-DG_LOG_DOMAIN="ADBC"',
+    sources: sources + enums,
+    install: true,
+    dependencies: dependencies,
+    include_directories: base_include_directories,
+    soversion: so_version,
+    version: library_version,
+)
+adbc_glib = declare_dependency(
+    link_with: libadbc_glib,
+    include_directories: base_include_directories,
+    dependencies: dependencies,
+    sources: enums_header,
+)
 
-pkgconfig.generate(libadbc_glib,
-                   description: 'GLib API for ADBC driver manager',
-                   filebase: 'adbc-glib',
-                   name: 'ADBC GLib',
-                   requires: ['gobject-2.0', 'adbc-driver-manager'],
-                   variables: pkgconfig_variables,
-                   version: meson.project_version())
+pkgconfig.generate(
+    libadbc_glib,
+    description: 'GLib API for ADBC driver manager',
+    filebase: 'adbc-glib',
+    name: 'ADBC GLib',
+    requires: ['gobject-2.0', 'adbc-driver-manager'],
+    variables: pkgconfig_variables,
+    version: meson.project_version(),
+)
 
-adbc_glib_gir = gnome.generate_gir(libadbc_glib,
-                                   export_packages: 'adbc-glib',
-                                   extra_args: [
-                                     '--warn-all',
-                                   ],
-                                   fatal_warnings: gi_fatal_warnings,
-                                   header: 'adbc-glib/adbc-glib.h',
-                                   identifier_prefix: 'GADBC',
-                                   includes: [
-                                     'GObject-2.0',
-                                   ],
-                                   install: true,
-                                   namespace: 'ADBC',
-                                   nsversion: api_version,
-                                   sources: sources + definition_headers + 
enums,
-                                   symbol_prefix: 'gadbc')
+adbc_glib_gir = gnome.generate_gir(
+    libadbc_glib,
+    export_packages: 'adbc-glib',
+    extra_args: ['--warn-all'],
+    fatal_warnings: gi_fatal_warnings,
+    header: 'adbc-glib/adbc-glib.h',
+    identifier_prefix: 'GADBC',
+    includes: ['GObject-2.0'],
+    install: true,
+    namespace: 'ADBC',
+    nsversion: api_version,
+    sources: sources + definition_headers + enums,
+    symbol_prefix: 'gadbc',
+)
 if generate_vapi
-  adbc_glib_vapi = gnome.generate_vapi('adbc-glib',
-                                       install: true,
-                                       packages: ['gobject-2.0'],
-                                       sources: [adbc_glib_gir[0]])
+    adbc_glib_vapi = gnome.generate_vapi(
+        'adbc-glib',
+        install: true,
+        packages: ['gobject-2.0'],
+        sources: [adbc_glib_gir[0]],
+    )
 endif
diff --git a/glib/example/meson.build b/glib/example/meson.build
index ed34fd028..df691dd32 100644
--- a/glib/example/meson.build
+++ b/glib/example/meson.build
@@ -18,17 +18,19 @@
 # under the License.
 
 if build_example
-  arrow_glib = dependency('arrow-glib')
-  executable('sqlite', 'sqlite.c',
-             dependencies: [adbc_glib, arrow_glib],
-             link_language: 'c')
+    arrow_glib = dependency('arrow-glib')
+    executable(
+        'sqlite',
+        'sqlite.c',
+        dependencies: [adbc_glib, arrow_glib],
+        link_language: 'c',
+    )
 endif
 
-files = [
-  'README.md',
-  'sqlite.c',
-]
-install_data(files,
-             install_dir: join_paths(data_dir, meson.project_name(), 
'example'))
+files = ['README.md', 'sqlite.c']
+install_data(
+    files,
+    install_dir: join_paths(data_dir, meson.project_name(), 'example'),
+)
 
 subdir('vala')
diff --git a/glib/example/vala/meson.build b/glib/example/vala/meson.build
index 26022bcce..e49f49d0c 100644
--- a/glib/example/vala/meson.build
+++ b/glib/example/vala/meson.build
@@ -18,32 +18,26 @@
 # under the License.
 
 if build_example and generate_vapi
-  vala_example_executable_kwargs = {
-    'c_args': [
-      '-I' + meson.build_root(),
-      '-I' + meson.source_root(),
-    ],
-    'dependencies': [
-      adbc_glib_vapi,
-      adbc_arrow_glib_vapi,
-      arrow_glib,
-      dependency('gobject-2.0'),
-    ],
-    'vala_args': [
-      '--pkg', 'posix',
-      '--vapidir', arrow_glib.get_variable('vapidir'),
-    ],
-  }
-  executable('sqlite', 'sqlite.vala',
-             kwargs: vala_example_executable_kwargs)
+    vala_example_executable_kwargs = {
+        'c_args': ['-I' + meson.build_root(), '-I' + meson.source_root()],
+        'dependencies': [
+            adbc_glib_vapi,
+            adbc_arrow_glib_vapi,
+            arrow_glib,
+            dependency('gobject-2.0'),
+        ],
+        'vala_args': [
+            '--pkg',
+            'posix',
+            '--vapidir',
+            arrow_glib.get_variable('vapidir'),
+        ],
+    }
+    executable('sqlite', 'sqlite.vala', kwargs: vala_example_executable_kwargs)
 endif
 
-files = [
-  'README.md',
-  'sqlite.vala',
-]
-install_data(files,
-             install_dir: join_paths(data_dir,
-                                     'adbc-arrow-glib',
-                                     'example',
-                                     'vala'))
+files = ['README.md', 'sqlite.vala']
+install_data(
+    files,
+    install_dir: join_paths(data_dir, 'adbc-arrow-glib', 'example', 'vala'),
+)
diff --git a/glib/meson.build b/glib/meson.build
index 97ff6d28a..5b1db07b5 100644
--- a/glib/meson.build
+++ b/glib/meson.build
@@ -17,13 +17,13 @@
 # specific language governing permissions and limitations
 # under the License.
 
-project('adbc-glib',
-        'c',
-        default_options: [
-          'c_std=c99',
-        ],
-        license: 'Apache-2.0',
-        version: '1.6.0-SNAPSHOT')
+project(
+    'adbc-glib',
+    'c',
+    default_options: ['c_std=c99'],
+    license: 'Apache-2.0',
+    version: '1.6.0-SNAPSHOT',
+)
 
 version_numbers = meson.project_version().split('-')[0].split('.')
 version_major = version_numbers[0].to_int()
@@ -46,23 +46,25 @@ pkgconfig = import('pkgconfig')
 pkgconfig_variables = ['girdir=@0@'.format(gir_dir)]
 
 base_include_directories = [
-  include_directories('.'),
-  include_directories('..' / 'c' / 'include'),
+    include_directories('.'),
+    include_directories('..' / 'c' / 'include'),
 ]
 
 gi_fatal_warnings = (build_machine.system() != 'windows')
 
 adbc_build_dir = get_option('adbc_build_dir')
 if adbc_build_dir != ''
-  adbc_build_dir = meson.source_root() / adbc_build_dir
+    adbc_build_dir = meson.source_root() / adbc_build_dir
 endif
 
 if adbc_build_dir == ''
-  adbc_driver_manager = dependency('adbc-driver-manager')
+    adbc_driver_manager = dependency('adbc-driver-manager')
 else
-  c_compiler = meson.get_compiler('c')
-  adbc_driver_manager = c_compiler.find_library('adbc_driver_manager',
-                                                dirs: [adbc_build_dir])
+    c_compiler = meson.get_compiler('c')
+    adbc_driver_manager = c_compiler.find_library(
+        'adbc_driver_manager',
+        dirs: [adbc_build_dir],
+    )
 endif
 
 build_example = get_option('example')
@@ -70,30 +72,32 @@ build_example = get_option('example')
 dependency('gobject-introspection-1.0', required: false).found()
 generate_vapi = get_option('vapi')
 if generate_vapi
-  pkgconfig_variables += ['vapidir=@0@'.format(vapi_dir)]
-  add_languages('vala')
+    pkgconfig_variables += ['vapidir=@0@'.format(vapi_dir)]
+    add_languages('vala')
 endif
 
 subdir('adbc-glib')
 arrow_glib = dependency('arrow-glib', required: generate_vapi)
 if arrow_glib.found()
-  subdir('adbc-arrow-glib')
+    subdir('adbc-arrow-glib')
 endif
 subdir('example')
 
-install_data('../LICENSE.txt',
-             'README.md',
-             install_dir: data_dir / 'doc' / meson.project_name())
+install_data(
+    '../LICENSE.txt',
+    'README.md',
+    install_dir: data_dir / 'doc' / meson.project_name(),
+)
 if arrow_glib.found()
-  install_data('../LICENSE.txt',
-               'README.md',
-               install_dir: data_dir / 'doc' / 'adbc-arrow-glib')
+    install_data(
+        '../LICENSE.txt',
+        'README.md',
+        install_dir: data_dir / 'doc' / 'adbc-arrow-glib',
+    )
 endif
 
 ruby = find_program('ruby', required: false)
 if ruby.found()
-  test_run_rb = files('test/run.rb')
-  test('unit test',
-       ruby,
-       args: [test_run_rb])
+    test_run_rb = files('test/run.rb')
+    test('unit test', ruby, args: [test_run_rb])
 endif

Reply via email to