Skip to content

Commit

Permalink
Merge pull request #149 from atsign-foundation/cpswan-fix-warning
Browse files Browse the repository at this point in the history
fix: Unnecessary null check on cmd line args
  • Loading branch information
gkc authored Nov 27, 2023
2 parents 3a12545 + 700de0c commit 46b84ac
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ jobs:
dart pub get
dart analyze
# TODO uncomment once warning is fixed
#- name: Install dependencies and run analyze - at_data_share
# working-directory: ./at_data_share/
# run: |
# dart pub get
# dart analyze
- name: Install dependencies and run analyze - at_data_share
working-directory: ./at_data_share/
run: |
dart pub get
dart analyze
# Runs osv-scanner to find any vulnerable Dart dependencies
# It needs to look at pubspec.lock files, which is why it's
Expand All @@ -62,4 +61,4 @@ jobs:
osv-scanner --lockfile=./mwc_demo/dart/iot_sender/pubspec.lock
osv-scanner --lockfile=./at_notifications/pubspec.lock
osv-scanner --lockfile=./at_demo_data/pubspec.lock
# osv-scanner --lockfile=./at_data_share/pubspec.lock
osv-scanner --lockfile=./at_data_share/pubspec.lock
2 changes: 1 addition & 1 deletion at_data_share/lib/src/util/command_line_parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class CommandLineParser {
ArgResults getParserResults(List<String> arguments, ArgParser parser) {
var results;
try {
if (arguments != null && arguments.isNotEmpty) {
if (arguments.isNotEmpty) {
results = parser.parse(arguments);
if (results.options.length != parser.options.length) {
throw ArgParserException('Invalid Arguments \n' + parser.usage);
Expand Down

0 comments on commit 46b84ac

Please sign in to comment.