Skip to content

Commit

Permalink
run swift format using bundled swift-format
Browse files Browse the repository at this point in the history
  • Loading branch information
lovetodream committed Sep 18, 2024
1 parent 6335750 commit 94403f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions Sources/OracleNIO/Deprecations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@

import struct Logging.Logger

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, renamed: "OracleStatement")
public typealias OracleQuery = OracleStatement

@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, renamed: "StatementOptions")
public typealias QueryOptions = StatementOptions

extension OracleSQLError.Code {
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, renamed: "statementCancelled")
public static let queryCancelled = OracleSQLError.Code.statementCancelled
}

extension OracleSQLError {
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, renamed: "statement", message: "will be removed before 1.0.0")
public internal(set) var query: OracleQuery? {
get { self.statement }
Expand All @@ -42,7 +42,7 @@ extension OracleSQLError {
}

extension OracleConnection {
@_documentation(visibility:internal)
@_documentation(visibility: internal)
@available(*, deprecated, renamed: "execute(_:options:logger:file:line:)")
@discardableResult
public func query(
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-swift-format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ fatal() { error "$@"; exit 1; }
CURRENT_SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPO_ROOT="$(git -C "${CURRENT_SCRIPT_DIR}" rev-parse --show-toplevel)"

FORMAT_COMMAND=(lint --strict)
FORMAT_COMMAND=(format lint --strict)
for arg in "$@"; do
if [ "$arg" == "--fix" ]; then
FORMAT_COMMAND=(format --in-place)
fi
done

SWIFTFORMAT_BIN=${SWIFTFORMAT_BIN:-$(command -v swift-format)} || fatal "❌ SWIFTFORMAT_BIN unset and no swift-format on PATH"
SWIFTFORMAT_BIN=${SWIFTFORMAT_BIN:-$(command -v swift)} || fatal "❌ SWIFTFORMAT_BIN unset and no swift-format on PATH"

git -C "${REPO_ROOT}" ls-files -z '*.swift' \
| grep -z -v -e 'Tests/LoggingLoki/Resources' \
Expand Down

0 comments on commit 94403f5

Please sign in to comment.