Skip to content

Commit

Permalink
fix: Fix pana static analyze
Browse files Browse the repository at this point in the history
  • Loading branch information
littleGnAl committed Mar 12, 2022
1 parent a321374 commit 981755b
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
name: CI

on:
# pull_request_target:
# types: [opened, synchronize]
# branches:
# - master
# # Temporarily allow check on dev/flutter2-iris branch
# - 'dev/flutter2-iris'
pull_request_target:
types: [opened, synchronize]
branches:
- master

push:
branches:
Expand Down
8 changes: 4 additions & 4 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ include: package:flutter_lints/flutter.yaml
analyzer:
exclude:
# Ignore generated files
- 'lib/src/*.g.dart'
- 'lib/src/generated/*.dart'
- 'integration_test_app/**'
- 'test/**'
- "**/*.g.dart"
- lib/src/generated/*.dart
- integration_test_app/**
- test/**

linter:
rules:
Expand Down
9 changes: 9 additions & 0 deletions build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
targets:
$default:
builders:
source_gen|combining_builder:
options:
ignore_for_file:
- non_constant_identifier_names
- deprecated_member_use_from_same_package
- unused_element
2 changes: 2 additions & 0 deletions lib/src/classes.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/src/enum_converter.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions lib/src/rtc_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,12 @@ class RtcChannel with RtcChannelInterface {
});
}

// TODO(littlegnal): Dead code to pass pana analyze, will fix it in 5.1.0
// ignore: unused_element
void _cancelSubscription() {
_subscription?.cancel();
}

///
/// Sets the event handler for the RtcChannel object.
/// After setting the channel event handler, you can listen for channel events and receive the statistics of the corresponding RtcChannel object.
Expand Down
6 changes: 6 additions & 0 deletions lib/src/rtc_engine.dart
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,12 @@ class RtcEngine with RtcEngineInterface {
});
}

// TODO(littlegnal): Dead code to pass pana analyze, will fix it in 5.1.0
// ignore: unused_element
void _cancelSubscription() {
_subscription?.cancel();
}

///
/// Adds event handlers
/// The SDK uses the RtcEngineEventHandler class to send callbacks to the app. The app inherits the methods of this class to receive these callbacks. All methods in this interface class have default (empty) implementations. Therefore, the application can only inherit some required events. In the callbacks, avoid time-consuming tasks or calling APIs that can block the thread, such as the sendStreamMessage method. Otherwise, the SDK may not work properly.
Expand Down

0 comments on commit 981755b

Please sign in to comment.