Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 1 addition & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,4 @@ jobs:
with:
name: MergedTestResults
path: test_output/final
retention-days: 30

discover-typos:
name: Discover Typos
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Discover typos
run: |
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
python3 -m pip install --upgrade pip
python3 -m pip install codespell
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
retention-days: 30
50 changes: 50 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: lint

on:
push:
branches:
- main
pull_request:
paths:
- "Sources/**"
- ".github/workflows/ci.yml"
- "Tests/**"

concurrency:
group: lint-${{ github.head_ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
lint:
name: lint
runs-on: macos-15
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: jdx/mise-action@v3
- name: Run
run: mise run lint

discover-typos:
name: discover-typos
runs-on: macos-15
env:
DEVELOPER_DIR: /Applications/Xcode_16.4.app/Contents/Developer
steps:
- uses: actions/checkout@v6

- name: Set up Python environment
run: |
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install codespell

- name: Discover typos
run: |
source .venv/bin/activate
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ final class QueryParametersFormatter: IQueryParametersFormatter {

func format(rawParameters: [AnyHashable: Any]) -> [String: String] {
var result: [String: String] = [:]
rawParameters.forEach { key, value in
for (key, value) in rawParameters {
guard
let encodedKey = convertKeyToEncodedString(key),
let encodedValue = convertValueToEncodedString(value)
else {
return
continue
}
result[encodedKey] = encodedValue
}
Expand All @@ -49,11 +49,11 @@ final class QueryParametersFormatter: IQueryParametersFormatter {
private func convertKeyToEncodedString(_ key: AnyHashable) -> String? {
switch key {
case let string as String:
return encodeQueryComponent(string)
encodeQueryComponent(string)
case let encodedComponent as SpecificEncodedComponent:
return encodedComponent.encodedValue
encodedComponent.encodedValue
case let convertible as CustomStringConvertible:
return encodeQueryComponent(convertible.description)
encodeQueryComponent(convertible.description)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// network-layer
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// network-layer
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// network-layer
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

import Foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// network-layer
// Copyright © 2024 Space Code. All rights reserved.
// Copyright © 2023 Space Code. All rights reserved.
//

@testable import NetworkLayer
Expand Down
Loading