From 633cf2e1c17c650e952b570d6a63d9d4d2256a14 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto <5731772+marandaneto@users.noreply.github.com> Date: Tue, 11 Oct 2022 10:54:45 +0200 Subject: [PATCH] Fix lint issues (#1067) --- .github/workflows/flutter.yml | 5 ++++- flutter/ios/Classes/SentryFlutterPluginApple.swift | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flutter.yml b/.github/workflows/flutter.yml index 1d75f40379..85ab19249f 100644 --- a/.github/workflows/flutter.yml +++ b/.github/workflows/flutter.yml @@ -187,6 +187,8 @@ jobs: steps: - uses: actions/checkout@v3 - uses: norio-nomura/action-swiftlint@9f4dcd7fd46b4e75d7935cf2f4df406d5cae3684 # pin@3.2.1 + with: + args: --strict ktlint: runs-on: ubuntu-latest @@ -202,6 +204,7 @@ jobs: github_token: ${{ secrets.github_token }} reporter: github-pr-review android: true + fail_on_error: true detekt: runs-on: ubuntu-latest @@ -210,4 +213,4 @@ jobs: # To recreate baseline run: detekt -i flutter/android,flutter/example/android -b flutter/config/detekt-bl.xml -cb - uses: natiginfo/action-detekt-all@e01de6ff0eef7c24131e8a133bf598cfac6ceeab # pin@1.21.0 with: - args: -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml + args: -i flutter/android,flutter/example/android --baseline flutter/config/detekt-bl.xml --jvm-target 1.8 --build-upon-default-config --all-rules diff --git a/flutter/ios/Classes/SentryFlutterPluginApple.swift b/flutter/ios/Classes/SentryFlutterPluginApple.swift index a78b7780df..cf567f69fd 100644 --- a/flutter/ios/Classes/SentryFlutterPluginApple.swift +++ b/flutter/ios/Classes/SentryFlutterPluginApple.swift @@ -128,7 +128,6 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin { } } - // swiftlint:disable:next cyclomatic_complexity private func loadContexts(result: @escaping FlutterResult) { SentrySDK.configureScope { scope in let serializedScope = scope.serialize() @@ -173,7 +172,8 @@ public class SentryFlutterPluginApple: NSObject, FlutterPlugin { // Not reading the name from PrivateSentrySDKOnly.getSdkName because // this is added as a package and packages should follow the sentry-release-registry format - infos["package"] = ["version": PrivateSentrySDKOnly.getSdkVersionString(), "sdk_name": "cocoapods:sentry-cocoa"] + infos["package"] = ["version": PrivateSentrySDKOnly.getSdkVersionString(), + "sdk_name": "cocoapods:sentry-cocoa"] result(infos) }