Skip to content

Commit 5086d4c

Browse files
authored
chore: format the sources and run a check in CI (#361)
1 parent 68003d2 commit 5086d4c

File tree

6 files changed

+14
-15
lines changed

6 files changed

+14
-15
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ jobs:
1919
working-directory: objectbox
2020
- run: dart analyze
2121
working-directory: objectbox
22+
- run: dart format --set-exit-if-changed --fix .
2223

2324
pana:
2425
runs-on: ubuntu-latest
@@ -29,7 +30,6 @@ jobs:
2930
with:
3031
githubToken: ${{ secrets.GITHUB_TOKEN }}
3132
relativePath: objectbox
32-
3333
# You can then use this id to retrieve the outputs in the next steps.
3434
# The following step shows how to exit the workflow with an error if a score is below 100:
3535
- name: Check scores

objectbox/example/flutter/objectbox_demo/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class _MyHomePageState extends State<MyHomePage> {
124124
Padding(
125125
padding: const EdgeInsets.symmetric(horizontal: 10.0),
126126
child: TextField(
127-
decoration:
128-
const InputDecoration(hintText: 'Enter a new note'),
127+
decoration: const InputDecoration(
128+
hintText: 'Enter a new note'),
129129
controller: _noteInputController,
130130
onSubmitted: (value) => _addNote(),
131131
// Provide a Key for the integration test

objectbox/example/flutter/objectbox_demo_sync/lib/main.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ class _MyHomePageState extends State<MyHomePage> {
124124
Padding(
125125
padding: const EdgeInsets.symmetric(horizontal: 10.0),
126126
child: TextField(
127-
decoration:
128-
const InputDecoration(hintText: 'Enter a new note'),
127+
decoration: const InputDecoration(
128+
hintText: 'Enter a new note'),
129129
controller: _noteInputController,
130130
onSubmitted: (value) => _addNote(),
131131
// Provide a Key for the integration test

objectbox/test/query_property_test.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -288,28 +288,28 @@ void main() {
288288
..distinct = false
289289
..caseSensitive = false)
290290
.find(replaceNullWith: 'meh')
291-
..sort();
291+
..sort();
292292
expect(resultsNone, defaultResults);
293293

294294
var resultsDC = (stringQuery
295295
..distinct = true
296296
..caseSensitive = true)
297297
.find()
298-
..sort();
298+
..sort();
299299
expect(resultsDC, ['1withSuffix', '2WITHSUFFIX', '2withSuffix']);
300300

301301
var resultsC = (stringQuery
302302
..distinct = false
303303
..caseSensitive = true)
304304
.find(replaceNullWith: 'meh')
305-
..sort();
305+
..sort();
306306
expect(resultsC, defaultResults);
307307

308308
var resultsD = (stringQuery
309309
..distinct = true
310310
..caseSensitive = false)
311311
.find()
312-
..sort();
312+
..sort();
313313
expect(resultsD, ['1withSuffix', '2withSuffix']);
314314

315315
stringQuery.close();

objectbox/test/query_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@ void main() {
824824
.query(TestEntity_.tString.oneOf([]) |
825825
TestEntity_.tString.oneOf([], alias: 'a'))
826826
.build()
827-
..param(TestEntity_.tString, alias: 'a').values = ['foo', 'bar'];
827+
..param(TestEntity_.tString, alias: 'a').values = ['foo', 'bar'];
828828
if (!['OR tString in ["foo", "bar"]', 'OR tString in ["bar", "foo"]']
829829
.any(q1.describeParameters().contains)) {
830830
fail('Invalid query: ' + q1.describeParameters());
@@ -834,7 +834,7 @@ void main() {
834834
.query(
835835
TestEntity_.tInt.oneOf([]) | TestEntity_.tInt.oneOf([], alias: 'a'))
836836
.build()
837-
..param(TestEntity_.tInt, alias: 'a').values = [1, 2];
837+
..param(TestEntity_.tInt, alias: 'a').values = [1, 2];
838838

839839
if (!['OR tInt in [1|2]', 'OR tInt in [2|1]']
840840
.any(q2.describeParameters().contains)) {
@@ -845,7 +845,7 @@ void main() {
845845
.query(TestEntity_.tLong.oneOf([]) |
846846
TestEntity_.tLong.oneOf([], alias: 'a'))
847847
.build()
848-
..param(TestEntity_.tLong, alias: 'a').values = [1, 2];
848+
..param(TestEntity_.tLong, alias: 'a').values = [1, 2];
849849

850850
if (!['OR tLong in [1|2]', 'OR tLong in [2|1]']
851851
.any(q3.describeParameters().contains)) {

objectbox/test/relations_test.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,9 +300,8 @@ void main() {
300300
entity.relManyA.add(RelatedEntityA(tInt: 1));
301301
expect(
302302
entity.relManyA.applyToDb,
303-
throwsA(predicate((StateError e) => e
304-
.toString()
305-
.contains("ToMany relation field not initialized. Don't call applyToDb() on new objects, use box.put() instead."))));
303+
throwsA(predicate((StateError e) => e.toString().contains(
304+
"ToMany relation field not initialized. Don't call applyToDb() on new objects, use box.put() instead."))));
306305
});
307306

308307
test("don't load old data when just adding", () {

0 commit comments

Comments
 (0)