diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..550aa411 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,19 @@ +# Copyright 2026 Columnar Technologies Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +repos: +- repo: https://github.com/crate-ci/typos + rev: bb4666ad77b539a6b4ce4eda7ebb6de553704021 # v1.42.0 + hooks: + - id: typos diff --git a/.typos.toml b/.typos.toml new file mode 100644 index 00000000..72761098 --- /dev/null +++ b/.typos.toml @@ -0,0 +1,24 @@ +# Copyright 2026 Columnar Technologies Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +[files] +extend-exclude = ["columnar.pubkey", "go.mod", "go.sum", "pixi.lock"] + +[type.fo] +extend-glob = ["*.go", ".goreleaser.yaml"] +extend-words = { fo = "fo" } + +[type.ine] +extend-glob = ["**/first_steps.md"] +extend-words = { ine = "ine" } diff --git a/cmd/dbc/install_test.go b/cmd/dbc/install_test.go index 74eaa9bc..f5a562e8 100644 --- a/cmd/dbc/install_test.go +++ b/cmd/dbc/install_test.go @@ -184,7 +184,7 @@ func (suite *SubcommandTestSuite) TestInstallGitignoreDefaultBehavior() { suite.FileExists(ignorePath) } -func (suite *SubcommandTestSuite) TestInstallGitignoreExisingDir() { +func (suite *SubcommandTestSuite) TestInstallGitignoreExistingDir() { driver_path := filepath.Join(suite.tempdir, "driver_path") ignorePath := filepath.Join(driver_path, ".gitignore") suite.T().Setenv("ADBC_DRIVER_PATH", driver_path) diff --git a/cmd/dbc/main.go b/cmd/dbc/main.go index 754530be..bd196559 100644 --- a/cmd/dbc/main.go +++ b/cmd/dbc/main.go @@ -203,7 +203,7 @@ func main() { if !isatty.IsTerminal(os.Stdout.Fd()) { prog = tea.NewProgram(m, tea.WithoutRenderer(), tea.WithInput(nil)) } else if args.Quiet { - // Quiet still prints stderr as GNU standard is to supress "usual" output + // Quiet still prints stderr as GNU standard is to suppress "usual" output prog = tea.NewProgram(m, tea.WithoutRenderer(), tea.WithInput(nil), tea.WithOutput(os.Stderr)) } else { prog = tea.NewProgram(m) diff --git a/docs/concepts/driver_manager.md b/docs/concepts/driver_manager.md index 61272abe..24a6496f 100644 --- a/docs/concepts/driver_manager.md +++ b/docs/concepts/driver_manager.md @@ -20,7 +20,7 @@ The term "driver manager" refers to an [ADBC Driver Manager](https://arrow.apach Driver managers load [ADBC drivers](driver.md) and provide a consistent API for using any driver. They're ideal for scenarios where an application needs to work with multiple drivers or use drivers written in a language that isn't the language the application is written in. However, using an ADBC driver with a driver manager is useful even if this isn't the case. -If you're familiar with standards like [ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity) and [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity), you may have seen the term "driver manager" before in those ecosystems. ADBC driver managers are fundementally similar to driver managers in these systems (i.e., they load drivers) but there are some practical differences: +If you're familiar with standards like [ODBC](https://en.wikipedia.org/wiki/Open_Database_Connectivity) and [JDBC](https://en.wikipedia.org/wiki/Java_Database_Connectivity), you may have seen the term "driver manager" before in those ecosystems. ADBC driver managers are fundamentally similar to driver managers in these systems (i.e., they load drivers) but there are some practical differences: - In ODBC, driver managers are installed system-wide. In ADBC, a driver manager is just a library you use alongside your program. - In JDBC, the driver manager is built into the language. In ADBC, driver managers are libraries that are available in many languages but must be installed separately. diff --git a/docs/guides/installing.md b/docs/guides/installing.md index 5f5ba52e..e96743e6 100644 --- a/docs/guides/installing.md +++ b/docs/guides/installing.md @@ -62,7 +62,7 @@ To install a specific version, you can pass a version constraint with the name: $ dbc install "mysql=0.1.0" ``` -The syntax for specifiying a version may be familiar to you if you've used other package managers. +The syntax for specifying a version may be familiar to you if you've used other package managers. !!! note dbc uses the [github.com/Masterminds/semver/v3](https://pkg.go.dev/github.com/Masterminds/semver/v3#section-readme) package whose README has a good overview of the syntax it allows. In short, you can use `=`, `!=`, `>`, `<`, `>=`, `<=`, `~`, `^`, ranges like `1.2 - 1.4.5`, and wildcards (`x`, `X`, or `*`). @@ -180,7 +180,7 @@ Installed mysql 0.1.0 to /Users/user/tmp/my-adbc-project/.venv/etc/adbc/drivers !!! note - [`ADBC_DRIVER_PATH`](#adbc_driver_path) takes precedence over a virtual environment. dbc (and [ADBC driver managers](../concepts/driver_manager.md)) use the following precedence hierarchy: `ADBC_DRIVER_PATH` before virtual enviroments before Conda environments. + [`ADBC_DRIVER_PATH`](#adbc_driver_path) takes precedence over a virtual environment. dbc (and [ADBC driver managers](../concepts/driver_manager.md)) use the following precedence hierarchy: `ADBC_DRIVER_PATH` before virtual environments before Conda environments. ## Conda Support @@ -200,7 +200,7 @@ Installed mysql 0.1.0 to /opt/homebrew/Caskroom/miniforge/base/envs/my-adbc-proj !!! note - [`ADBC_DRIVER_PATH`](#adbc_driver_path) and/or an activated Python virtual environment will take precedence over a Conda environment. dbc (and [ADBC driver managers](../concepts/driver_manager.md)) use the following precedence hierarchy: `ADBC_DRIVER_PATH` before virtual enviroments before Conda environments. + [`ADBC_DRIVER_PATH`](#adbc_driver_path) and/or an activated Python virtual environment will take precedence over a Conda environment. dbc (and [ADBC driver managers](../concepts/driver_manager.md)) use the following precedence hierarchy: `ADBC_DRIVER_PATH` before virtual environments before Conda environments. ## Uninstalling Drivers diff --git a/scripts/install.ps1 b/scripts/install.ps1 index d6a28c90..75528d90 100644 --- a/scripts/install.ps1 +++ b/scripts/install.ps1 @@ -176,7 +176,7 @@ function Download($download_url, $platforms) { $bin_names = $info["bins"] $artifact_name = $info["artifact_name"] - # Make a new temp dir to unpack thigns to + # Make a new temp dir to unpack things to $tmp = New-Temp-Dir $dir_path = "$tmp\$app_name$zip_ext"