From 00385e1a4b7ef1c0838636916af3cbdce56d0d82 Mon Sep 17 00:00:00 2001 From: Denis Andrasec Date: Tue, 16 May 2023 16:24:46 +0200 Subject: [PATCH] revert ci changes --- .github/workflows/analyze.yml | 13 ++----------- .github/workflows/flutter.yml | 12 ++++++++++++ flutter/ios/Classes/SentryFlutterPluginApple.swift | 2 -- flutter/lib/src/sentry_flutter_options.dart | 3 +-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 9d0ab12127..ee77ad291e 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -44,20 +44,11 @@ jobs: - run: dart fix --apply - - name: swiftlint --fix - uses: norio-nomura/action-swiftlint@9f4dcd7fd46b4e75d7935cf2f4df406d5cae3684 # pin@v3.2.1 - if: ${{ inputs.package == 'flutter' }} - with: - args: --strict --fix - # actions/checkout fetches only a single commit in a detached HEAD state. Therefore # we need to pass the current branch, otherwise we can't commit the changes. # GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs. - - name: commit formatted code - env: - BRANCH_NAME: ${{ github.head_ref || github.ref_name }} - run: echo $BRANCH_NAME # ../scripts/commit-formatted-code.sh $BRANCH_NAME - if: $BRANCH_NAME != null + - run: ../scripts/commit-formatted-code.sh $GITHUB_HEAD_REF + if: env.GITHUB_HEAD_REF != null - name: dart analyze uses: invertase/github-action-dart-analyzer@cdd8652b05bf7ed08ffce30f425436780f869f13 # pin@v1 diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index d3e7d2355a..e03cb7d394 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -160,6 +160,18 @@ jobs: # https://github.com/CocoaPods/CocoaPods/issues/5275#issuecomment-315461879 - run: pod lib lint ios/sentry_flutter.podspec --configuration=Debug --skip-import-validation --allow-warnings + swift-lint: + runs-on: ubuntu-latest + timeout-minutes: 20 + defaults: + run: + working-directory: ./flutter + steps: + - uses: actions/checkout@v3 + - uses: norio-nomura/action-swiftlint@9f4dcd7fd46b4e75d7935cf2f4df406d5cae3684 # pin@3.2.1 + with: + args: --strict + ktlint: runs-on: ubuntu-latest timeout-minutes: 20 diff --git a/flutter/ios/Classes/SentryFlutterPluginApple.swift b/flutter/ios/Classes/SentryFlutterPluginApple.swift index 196edea2a2..d5baa5fd0f 100644 --- a/flutter/ios/Classes/SentryFlutterPluginApple.swift +++ b/flutter/ios/Classes/SentryFlutterPluginApple.swift @@ -576,8 +576,6 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin { result("") } - - private func addBreadcrumb(breadcrumb: [String: Any?]?, result: @escaping FlutterResult) { if let breadcrumb = breadcrumb { let breadcrumbInstance = PrivateSentrySDKOnly.breadcrumb(with: breadcrumb) diff --git a/flutter/lib/src/sentry_flutter_options.dart b/flutter/lib/src/sentry_flutter_options.dart index f2b31cc891..2f5ccd96d1 100644 --- a/flutter/lib/src/sentry_flutter_options.dart +++ b/flutter/lib/src/sentry_flutter_options.dart @@ -38,8 +38,7 @@ class SentryFlutterOptions extends SentryOptions { /// /// Disabling this feature affects the [enableAutoSessionTracking] /// feature, as this is required to mark Sessions as Crashed. - bool enableNativeCrashHandling = - true; + bool enableNativeCrashHandling = true; Duration _autoSessionTrackingInterval = Duration(milliseconds: 30000);