Skip to content

Commit b6c6a00

Browse files
Merge branch 'main' into lint-cleanup
2 parents 9c51c8b + 4f00adc commit b6c6a00

53 files changed

Lines changed: 7270 additions & 7248 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.devcontainer/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# GOTOOLCHAIN=auto lets Go download the exact patch version (e.g. 1.25.9)
44
# when the base image is slightly behind. Downloads are verified against
55
# sum.golang.org.
6-
FROM mcr.microsoft.com/devcontainers/go:1.25-bookworm
6+
FROM mcr.microsoft.com/devcontainers/go:2-1.26-bookworm
77
ENV GOTOOLCHAIN=auto
88

99
# The base image sets GOPATH=/go owned by root. Override to a user-writable

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
// Features to add to the dev container
8282
"features": {
83-
"ghcr.io/devcontainers/features/docker-in-docker:2": {
83+
"ghcr.io/devcontainers/features/docker-in-docker:4": {
8484
"moby": true
8585
},
8686
"ghcr.io/devcontainers/features/github-cli:1": {}

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ When adding new commands:
147147

148148
The project supports creating SQL Server instances using Docker or Podman:
149149
- Container management is in `internal/container/`
150-
- Supports SQL Server and Azure SQL Edge images
150+
- Supports SQL Server images
151151

152152
## Localization
153153

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,43 @@ updates:
6363
github-actions:
6464
patterns:
6565
- "*"
66+
67+
# Enable version updates for the release Dockerfile
68+
- package-ecosystem: "docker"
69+
directory: "/"
70+
schedule:
71+
interval: "weekly"
72+
open-pull-requests-limit: 5
73+
labels:
74+
- "dependencies"
75+
- "docker"
76+
commit-message:
77+
prefix: "deps"
78+
include: "scope"
79+
80+
# Enable version updates for the devcontainer Dockerfile
81+
- package-ecosystem: "docker"
82+
directory: "/.devcontainer"
83+
schedule:
84+
interval: "weekly"
85+
open-pull-requests-limit: 5
86+
labels:
87+
- "dependencies"
88+
- "docker"
89+
- "devcontainer"
90+
commit-message:
91+
prefix: "deps"
92+
include: "scope"
93+
94+
# Enable version updates for devcontainer features
95+
- package-ecosystem: "devcontainers"
96+
directory: "/"
97+
schedule:
98+
interval: "weekly"
99+
open-pull-requests-limit: 5
100+
labels:
101+
- "dependencies"
102+
- "devcontainer"
103+
commit-message:
104+
prefix: "deps"
105+
include: "scope"

.github/workflows/devcontainer-check.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,18 @@ jobs:
1515
check-go-version-alignment:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
18+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1919

2020
- name: Verify Dockerfile Go version satisfies go.mod
2121
run: |
2222
# Extract the major.minor Go version required by go.mod
2323
GOMOD_VERSION=$(grep '^go ' go.mod | awk '{print $2}')
2424
GOMOD_MAJOR_MINOR=$(echo "$GOMOD_VERSION" | grep -oE '^[0-9]+\.[0-9]+')
2525
26-
# Extract the Go version from the Dockerfile base image tag
27-
DOCKERFILE_TAG=$(grep -oP 'devcontainers/go:\K[0-9]+\.[0-9]+' .devcontainer/Dockerfile)
26+
# Extract the Go version from the Dockerfile base image tag.
27+
# Accept both the legacy form (go:1.26-bookworm) and the variant-prefixed
28+
# form (go:2-1.26-bookworm) published on mcr.microsoft.com.
29+
DOCKERFILE_TAG=$(grep -oP 'devcontainers/go:(?:[0-9]+-)?\K[0-9]+\.[0-9]+' .devcontainer/Dockerfile)
2830
2931
echo "go.mod requires: go ${GOMOD_VERSION} (major.minor: ${GOMOD_MAJOR_MINOR})"
3032
echo "Dockerfile base image: go:${DOCKERFILE_TAG}"

.github/workflows/golangci-lint.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ jobs:
1313
name: lint-pr-changes
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
16+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
17+
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
1718
with:
18-
go-version: '1.25.10'
19-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
19+
go-version-file: go.mod
20+
check-latest: true
2021
- name: golangci-lint
2122
# Pinned to commit SHA for supply chain security (CWE-829)
2223
# Verify: gh api repos/golangci/golangci-lint-action/git/ref/tags/v9 --jq '.object.sha'
23-
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.0.0
24+
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.0.0
2425
with:
2526
version: latest
2627
only-new-issues: true

.github/workflows/pr-validation.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,12 @@ jobs:
1212
build:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
15+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
1616
- name: Setup go
17-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
17+
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
1818
with:
19-
go-version: '1.25.10'
19+
go-version-file: go.mod
20+
check-latest: true
2021
- name: Run tests against Linux SQL
2122
run: |
2223
go version

.github/workflows/security.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout code
27-
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2828

2929
- name: Setup Go
30-
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
30+
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
3131
with:
3232
go-version-file: go.mod
33+
check-latest: true
3334

3435
- name: Install govulncheck
35-
run: go install golang.org/x/vuln/cmd/govulncheck@latest
36+
run: go install golang.org/x/vuln/cmd/govulncheck@v1.1.4
3637

3738
- name: Run govulncheck
3839
run: govulncheck ./...

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ The Homebrew package manager may be used on Linux and Windows Subsystem for Linu
5757
| --------------------- | --------------------- |
5858
| `brew install sqlcmd` | `brew upgrade sqlcmd` |
5959

60-
## Use sqlcmd to create local SQL Server and Azure SQL Edge instances
60+
## Use sqlcmd to create local SQL Server instances
6161

62-
Use `sqlcmd` to create SQL Server and Azure SQL Edge instances using a local container runtime (e.g. [Docker][] or [Podman][])
62+
Use `sqlcmd` to create SQL Server instances using a local container runtime (e.g. [Docker][] or [Podman][])
6363

6464
### Create SQL Server instance using local container runtime and connect using Azure Data Studio
6565

@@ -84,6 +84,15 @@ sqlcmd config connection-strings
8484
sqlcmd config view
8585
```
8686

87+
#### Custom configuration files
88+
89+
The `--sqlconfig` flag specifies a custom configuration file. The file must be YAML. Extensionless filenames are allowed; if the file has an extension, it must be `.yaml` or `.yml`:
90+
91+
```
92+
sqlcmd config --sqlconfig ./myproject.yaml add-endpoint --name ep1434 --address localhost --port 1434
93+
sqlcmd config --sqlconfig ./myproject.yaml view
94+
```
95+
8796
### Versions
8897

8998
To see all version tags to choose from (2017, 2019, 2022 etc.), and install a specific version, run:
@@ -174,6 +183,7 @@ switches are most important to you to have implemented next in the new sqlcmd.
174183
- `:Connect` now has an optional `-G` parameter to select one of the authentication methods for Azure SQL Database - `SqlAuthentication`, `ActiveDirectoryDefault`, `ActiveDirectoryIntegrated`, `ActiveDirectoryServicePrincipal`, `ActiveDirectoryManagedIdentity`, `ActiveDirectoryPassword`. If `-G` is not provided, either Integrated security or SQL Authentication will be used, dependent on the presence of a `-U` username parameter.
175184
- The new `--driver-logging-level` command line parameter allows you to see traces from the `go-mssqldb` client driver. Use `64` to see all traces.
176185
- Sqlcmd can now print results using a vertical format. Use the new `--vertical` command line option to set it. It's also controlled by the `SQLCMDFORMAT` scripting variable.
186+
- Sqlcmd defaults to a horizontal output format (space separated, no borders). To use the new ASCII table format, use the new `--ascii` command line option or set `SQLCMDFORMAT` to `ascii` (`-v SQLCMDFORMAT=ascii`). Note that when using the ASCII table format, individual column widths are determined by the content, but the `SQLCMDCOLWIDTH` variable and the `-w` parameter are still used to control the maximum screen width, determining when columns wrap into separate table segments. The following variables are ignored: `SQLCMDMAXFIXEDTYPEWIDTH`, `SQLCMDMAXVARTYPEWIDTH`, and `SQLCMDHEADERS`.
177187

178188
```
179189
1> select session_id, client_interface_name, program_name from sys.dm_exec_sessions where session_id=@@spid

cmd/modern/root/install.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ func (c *Install) DefineCommand(...cmdparser.CommandOptions) {
2626
}
2727

2828
// SubCommands sets up the sub-commands for `sqlcmd install` such as
29-
// `sqlcmd install mssql` and `sqlcmd install azsql-edge`
29+
// `sqlcmd install mssql`
3030
func (c *Install) SubCommands() []cmdparser.Command {
3131
dependencies := c.Dependencies()
3232

3333
return []cmdparser.Command{
3434
cmdparser.New[*install.Mssql](dependencies),
35-
cmdparser.New[*install.Edge](dependencies),
3635
}
3736
}

0 commit comments

Comments
 (0)