Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: taji-taji/DangerSwiftPeriphery
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.2.2
Choose a base ref
...
head repository: taji-taji/DangerSwiftPeriphery
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Aug 27, 2022

  1. fixed: ignore invalid diff

    taji-taji committed Aug 27, 2022
    Copy the full SHA
    1102dc3 View commit details
  2. Copy the full SHA
    3fe4990 View commit details
  3. Copy the full SHA
    ec2dc80 View commit details
  4. Copy the full SHA
    1fac348 View commit details
  5. Merge pull request #26 from taji-taji/ignore-no-diff-file

    Ignore no diff file
    taji-taji authored Aug 27, 2022
    Copy the full SHA
    6092c88 View commit details
  6. Merge pull request #27 from taji-taji/update-danger-swift-to-3.14.0

    Update danger swift to 3.14.0
    taji-taji authored Aug 27, 2022
    Copy the full SHA
    d7c9147 View commit details
  7. Copy the full SHA
    d63b276 View commit details
  8. add danger-swift

    taji-taji committed Aug 27, 2022
    Copy the full SHA
    1118cdb View commit details
  9. added: run Danger on CI

    taji-taji committed Aug 27, 2022
    Copy the full SHA
    ed7bfee View commit details
  10. Merge pull request #28 from taji-taji/introduce-danger-swift

    Introduce danger swift
    taji-taji authored Aug 27, 2022
    Copy the full SHA
    6dea71e View commit details
  11. added: release workflow

    taji-taji committed Aug 27, 2022
    Copy the full SHA
    756bc3f View commit details
  12. Merge pull request #29 from taji-taji/create-tag-workflow

    added: release workflow
    taji-taji authored Aug 27, 2022
    Copy the full SHA
    4b14523 View commit details
  13. fixed: create release

    taji-taji committed Aug 27, 2022
    Copy the full SHA
    a14f6e8 View commit details
  14. Merge pull request #30 from taji-taji/fix-release-workflow

    fixed: create release
    taji-taji authored Aug 27, 2022
    Copy the full SHA
    41dc977 View commit details

Commits on Aug 28, 2022

  1. update README badges

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    e4c2691 View commit details
  2. Merge pull request #31 from taji-taji/update-readme-badge

    update README badges
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    8a3018d View commit details
  3. add ShellExecutorTests

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    27bfe4b View commit details
  4. Copy the full SHA
    7df692f View commit details
  5. Merge pull request #33 from taji-taji/fix-shell-executor-on-linux

    Fix shell executor on linux
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    2f96edc View commit details
  6. fixed: typo

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    35c2a9d View commit details
  7. Copy the full SHA
    c7c9932 View commit details
  8. Merge pull request #34 from taji-taji/rename-danger-commentable

    Rename danger commentable
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    011eabd View commit details
  9. added: .swiftlint.yml

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    c7a12c9 View commit details
  10. apply swiftlint

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    db36160 View commit details
  11. run SwiftLint on CI

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    73f8048 View commit details
  12. Merge pull request #35 from taji-taji/introduce-swiftlint

    Introduce SwiftLint
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    32c7f76 View commit details
  13. update README.md

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    414aa20 View commit details
  14. Merge pull request #37 from taji-taji/update-readme-usage

    update Usage on README.md
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    29d9c7b View commit details
  15. fixed: release workflow

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    d93e567 View commit details
  16. Merge pull request #38 from taji-taji/fix-release-workflow

    fixed: release workflow
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    809ee3e View commit details
  17. add title and body

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    1b4e85e View commit details
  18. Merge pull request #39 from taji-taji/fix-release-workflow

    fixed: release workflow
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    0a4a55b View commit details
  19. Copy the full SHA
    95090b6 View commit details
  20. Restore isDevelop flag

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    30ba781 View commit details
  21. no merge

    taji-taji committed Aug 28, 2022
    Copy the full SHA
    5a0512d View commit details
  22. Merge pull request #40 from taji-taji/release/1.2.4

    Release 1.2.4
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    19dde5b View commit details
  23. Merge pull request #41 from taji-taji/fix-release-workflow

    no PR merge in release workflow
    taji-taji authored Aug 28, 2022
    Copy the full SHA
    d1b639e View commit details

Commits on Sep 3, 2022

  1. use taji-taji/swift-shell

    taji-taji committed Sep 3, 2022
    Copy the full SHA
    5b34841 View commit details
  2. add xcbeautify

    taji-taji committed Sep 3, 2022
    Copy the full SHA
    e16729c View commit details
  3. add Makefile

    taji-taji committed Sep 3, 2022
    Copy the full SHA
    960c924 View commit details
  4. use make test

    taji-taji committed Sep 3, 2022
    Copy the full SHA
    67c2c28 View commit details
  5. Copy the full SHA
    3291fea View commit details
  6. fixed: Package.resolved

    taji-taji committed Sep 3, 2022
    Copy the full SHA
    16d3599 View commit details
  7. Merge pull request #43 from taji-taji/use-shell-library

    use taji-taji/swift-shell
    taji-taji authored Sep 3, 2022
    Copy the full SHA
    33f2d07 View commit details

Commits on Sep 4, 2022

  1. Merge pull request #44 from taji-taji/dev-tools

    Dev tools
    taji-taji authored Sep 4, 2022
    Copy the full SHA
    4e7c887 View commit details
  2. add badges to README.md

    taji-taji committed Sep 4, 2022
    Copy the full SHA
    fa6ede2 View commit details
  3. Copy the full SHA
    2fec855 View commit details

Commits on Sep 8, 2022

  1. update package

    taji-taji committed Sep 8, 2022
    Copy the full SHA
    23cbf7e View commit details
  2. Copy the full SHA
    d70e1ca View commit details

Commits on Sep 12, 2022

  1. Copy the full SHA
    0fd36b8 View commit details
Showing with 822 additions and 567 deletions.
  1. +28 −0 .github/workflows/danger.yml
  2. +66 −0 .github/workflows/release.yml
  3. +55 −25 .github/workflows/test.yml
  4. +4 −1 .gitignore
  5. +8 −0 .swiftlint.yml
  6. +8 −0 Dangerfile.swift
  7. 0 DevTools/Dummy.swift
  8. +43 −0 DevTools/Package.resolved
  9. +13 −0 DevTools/Package.swift
  10. +12 −0 Makefile
  11. +156 −140 Package.resolved
  12. +27 −7 Package.swift
  13. +33 −15 README.md
  14. 0 Sources/DangerDependencies/Fake.swift
  15. +0 −7 Sources/DangerSwiftPeriphery/CheckstyleOutputParser.swift
  16. +1 −7 Sources/DangerSwiftPeriphery/CurrentPathProvider.swift
  17. +16 −16 Sources/DangerSwiftPeriphery/DangerDSL+Extensions.swift
  18. +82 −30 Sources/DangerSwiftPeriphery/DangerPeriphery.swift
  19. +0 −82 Sources/DangerSwiftPeriphery/PeripheryArguments.swift
  20. +0 −36 Sources/DangerSwiftPeriphery/PeripheryArgumentsBuilder.swift
  21. +7 −14 Sources/DangerSwiftPeriphery/PeripheryScanCommandBuilder.swift
  22. +4 −10 Sources/DangerSwiftPeriphery/PeripheryScanExecutor.swift
  23. +103 −0 Sources/DangerSwiftPeriphery/PeripheryScanOptions.swift
  24. +35 −0 Sources/DangerSwiftPeriphery/PeripheryScanOptionsBuilder.swift
  25. +13 −34 Sources/DangerSwiftPeriphery/ShellExecutor.swift
  26. +1 −6 Sources/DangerSwiftPeriphery/Violation.swift
  27. +1 −1 Sources/DangerSwiftPeriphery/{DangerCommentable.swift → ViolationNotifier.swift}
  28. +4 −11 Tests/DangerSwiftPeripheryTests/CheckstyleOutputParserTests.swift
  29. +22 −32 Tests/DangerSwiftPeripheryTests/DangerSwiftPeripheryTests.swift
  30. +0 −4 Tests/DangerSwiftPeripheryTests/Mocks/CheckstyleOutputParsableMock.swift
  31. +0 −4 Tests/DangerSwiftPeripheryTests/Mocks/PeripheryScanExecutableMock.swift
  32. +0 −4 Tests/DangerSwiftPeripheryTests/Mocks/PullRequestDiffProvidableMock.swift
  33. +0 −4 Tests/DangerSwiftPeripheryTests/Mocks/ShellExecutableMock.swift
  34. +1 −5 Tests/DangerSwiftPeripheryTests/Mocks/{DangerCommentableMock.swift → ViolationNotifierMock.swift}
  35. +23 −0 Tests/DangerSwiftPeripheryTests/PeripheryExecutionTests.swift
  36. +7 −14 Tests/DangerSwiftPeripheryTests/PeripheryScanCommandBuilderTests.swift
  37. +12 −19 Tests/DangerSwiftPeripheryTests/PeripheryScanExecutorTests.swift
  38. +26 −30 ...iftPeripheryTests/{PeripheryArgumentsBuilderTests.swift → PeripheryScanOptionsBuilderTests.swift}
  39. +11 −9 Tests/DangerSwiftPeripheryTests/{PeripheryArgumentsTests.swift → PeripheryScanOptionsTests.swift}
28 changes: 28 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Danger

on:
pull_request

jobs:
danger:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ runner.os }}-dependencies-${{ hashFiles('**/Package.resolved') }}
restore-keys: |
${{ runner.os }}-dependencies-${{ hashFiles('**/Package.resolved') }}
${{ runner.os }}-dependencies-
- name: Danger
run: |
brew install danger/tap/danger-swift
danger-swift ci
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Release

on:
workflow_dispatch:
inputs:
version_incremental_level:
description: next incremental level
required: true
type: choice
options:
- major
- minor
- patch

jobs:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install SemVer
run: |
npm install -g semver
- name: Fetch Latest Release
id: fetch-latest-release
run: |
release=$(gh release list --limit 1)
release_array=($release)
echo "LATEST_VERSION=${release_array[0]}" >> $GITHUB_OUTPUT
- name: Create Next Version
id: create-next-version
run: |
latest_version=${{ steps.fetch-latest-release.outputs.LATEST_VERSION }}
incremental_level=${{ inputs.version_incremental_level }}
next_version=$(semver ${latest_version} -i ${incremental_level})
echo "NEXT_VERSION=${next_version}" >> $GITHUB_OUTPUT
- name: Create Release Branch
run: |
git switch -c release/${{ steps.create-next-version.outputs.NEXT_VERSION }}
- name: Change Package.swift for Release
run: |
sed -i -e 's/let isDevelop = true/let isDevelop = false/' Package.swift
- name: Git Config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Commit & Push
run: |
git add Package.swift
git commit -m 'Change isDevelop flag to release ${{ steps.create-next-version.outputs.NEXT_VERSION }}'
git push origin release/${{ steps.create-next-version.outputs.NEXT_VERSION }}
- name: Create PR
run: |
gh pr create --base main --title "Release ${{ steps.create-next-version.outputs.NEXT_VERSION }}" --body "Release ${{ steps.create-next-version.outputs.NEXT_VERSION }}"
- name: Create Release
run: |
gh release create ${{ steps.create-next-version.outputs.NEXT_VERSION }} --generate-notes --target release/${{ steps.create-next-version.outputs.NEXT_VERSION }}
- name: Restore isDevelop Commit & Push
run: |
sed -i -e 's/let isDevelop = false/let isDevelop = true/' Package.swift
git add Package.swift
git commit -m 'Restore isDevelop flag'
git push origin release/${{ steps.create-next-version.outputs.NEXT_VERSION }}
80 changes: 55 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -11,63 +11,94 @@ jobs:
strategy:
fail-fast: false
matrix:
xcode: ["13.4.1", "13.3.1", "13.2.1"]
xcode: ["14.3.1", "15.0.1"]
include:
- xcode: "13.4.1"
macos: macos-12
- xcode: "13.3.1"
macos: macos-12
- xcode: "13.2.1"
macos: macos-12
- xcode: "14.3.1"
macos: macos-13
- xcode: "15.0.1"
macos: macos-13
runs-on: ${{ matrix.macos }}
name: macOS
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app; swift -version
- name: Get Swift Version
id: get-swift-version
run: |
echo "::set-output name=version::$(swift -version | head -n 1 | sed s/,// )"
echo "version=$(swift -version | head -n 1 | sed s/,// )" >> $GITHUB_OUTPUT
- name: Cache DevTools
uses: actions/cache@v3
with:
path: |
./DevTools/.build/release
key: ${{ runner.os }}-DevTools-${{ matrix.xcode }}-${{ hashFiles('./DevTools/Package.resolved') }}
restore-keys: |
${{ runner.os }}-DevTools-${{ matrix.xcode }}-${{ hashFiles('./DevTools/Package.resolved') }}
${{ runner.os }}-DevTools-${{ matrix.xcode }}-
- name: Install DevTools
run: |
if [ ! -e ./DevTools/.build/release/xcbeautify ]; then
make dev
fi
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
.build/artifacts
.build/checkouts
.build/repositories
key: ${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
key: ${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('./Package.resolved') }}
restore-keys: |
${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('**/Package.resolved') }}
${{ runner.os }}-dependencies-${{ matrix.xcode }}-${{ hashFiles('./Package.resolved') }}
${{ runner.os }}-dependencies-${{ matrix.xcode }}-
- name: Test
run: swift test
run: make test
linux:
strategy:
fail-fast: false
matrix:
swift: ["5.6", "5.5"]
swift: ["5.8", "5.9"]
include:
- swift: "5.6"
container: "swift:5.6"
cache-version: 2
- swift: "5.5"
container: "swift:5.5"
cache-version: 2
- swift: "5.8"
container: "swift:5.8"
cache-version: 1
- swift: "5.9"
container: "swift:5.9"
cache-version: 1
runs-on: ubuntu-latest
container: ${{ matrix.container }}
name: Linux
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Get Swift Version
id: get-swift-version
run: |
echo "::set-output name=version::$(swift -version | head -n 1 | sed s/,// )"
echo "version=$(swift -version | head -n 1 | sed s/,// )" >> $GITHUB_OUTPUT
shell: bash
- name: Cache DevTools
uses: actions/cache@v3
with:
path: |
./DevTools/.build/release
key: ${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-${{ hashFiles('./DevTools/Package.resolved') }}
restore-keys: |
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-${{ hashFiles('./DevTools/Package.resolved') }}
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}}-DevTools-
- name: Install make command
run: |
if ! command -v make /dev/null; then
apt-get update && apt-get install make
fi
- name: Install DevTools
run: |
if [ ! -e ./DevTools/.build/release/xcbeautify ]; then
make dev
fi
- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
.build/artifacts
@@ -77,5 +108,4 @@ jobs:
restore-keys: |
${{ matrix.cache-version }}-${{ runner.os }}-${{ steps.get-swift-version.outputs.version }}-spm-deps-
- name: Test
run: swift test

run: make test
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
.DS_Store
/.build
/**/.build
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

# IDEs
.idea
8 changes: 8 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
disabled_rules:
- trailing_comma
included:
- Sources
- Tests
- Package.swift
- Dangerfile.swift
line_length: 150
8 changes: 8 additions & 0 deletions Dangerfile.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import Danger
import DangerSwiftPeriphery

SwiftLint.lint()

DangerPeriphery.scan(arguments: [
.retainPublic
])
Empty file added DevTools/Dummy.swift
Empty file.
43 changes: 43 additions & 0 deletions DevTools/Package.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"object": {
"pins": [
{
"package": "Colorizer",
"repositoryURL": "https://github.com/getGuaka/Colorizer.git",
"state": {
"branch": null,
"revision": "2ccc99bf1715e73c4139e8d40b6e6b30be975586",
"version": "0.2.1"
}
},
{
"package": "swift-argument-parser",
"repositoryURL": "https://github.com/apple/swift-argument-parser.git",
"state": {
"branch": null,
"revision": "9f39744e025c7d377987f30b03770805dcb0bcd1",
"version": "1.1.4"
}
},
{
"package": "xcbeautify",
"repositoryURL": "https://github.com/tuist/xcbeautify",
"state": {
"branch": null,
"revision": "a3f5db18e7218a3817031b1b8227b1cb5704cb93",
"version": "0.13.0"
}
},
{
"package": "XMLCoder",
"repositoryURL": "https://github.com/MaxDesiatov/XMLCoder.git",
"state": {
"branch": null,
"revision": "ca932442d7481700f5434a7b138c47dd42d9902b",
"version": "0.14.0"
}
}
]
},
"version": 1
}
13 changes: 13 additions & 0 deletions DevTools/Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// swift-tools-version: 5.5
import PackageDescription

let package = Package(
name: "DevTools",
platforms: [.macOS(.v10_11)],
dependencies: [
.package(url: "https://github.com/tuist/xcbeautify", from: "0.13.0"),
],
targets: [
.target(name: "DevTools", path: "")
]
)
12 changes: 12 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
SWIFT = $(shell which swift)
DEV_TOOLS_BUILD_FLAGS = --configuration release --package-path ./DevTools
XCBEAUTIFY_EXECUTABLE = ./DevTools/.build/release/xcbeautify
SHELL=/bin/bash

.PHONY: dev
dev:
$(SWIFT) build $(DEV_TOOLS_BUILD_FLAGS) --product xcbeautify

.PHONY: test
test:
set -eo pipefail && $(SWIFT) test 2>&1 | $(XCBEAUTIFY_EXECUTABLE)
Loading