Skip to content

Commit

Permalink
Add example to linter
Browse files Browse the repository at this point in the history
  • Loading branch information
f3ath committed Jul 29, 2020
1 parent 3e0cff4 commit d378406
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ jobs:
- name: Install dependencies
run: pub get
- name: Analyzer
run: dartanalyzer --fatal-infos --fatal-warnings lib test
run: dartanalyzer --fatal-infos --fatal-warnings lib test example
- name: Tests
run: pub run test
4 changes: 3 additions & 1 deletion lib/src/json_path.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import 'package:json_path/src/selector/selector.dart';
import 'package:json_path/src/state.dart';
import 'package:json_path/src/tokenize.dart';

/// A JSONPath expression
class JsonPath {
/// Creates an instance from string
factory JsonPath(String expression) {
State state = Ready(Root());
for (final node in Node.build(tokenize(expression)).children) {
Expand All @@ -18,7 +20,7 @@ class JsonPath {

final Selector _selector;

/// Filters the given [json].
/// Filters the given [json] object.
/// Returns an Iterable of all elements found
Iterable<Result> select(json) => _selector([Result(json, '')]);

Expand Down

0 comments on commit d378406

Please sign in to comment.