Skip to content

Commit

Permalink
Improve formatting (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
polina-c authored Feb 7, 2024
1 parent ddb316d commit 84424eb
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 9 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.15

* Improve formatting.

# 1.0.14

* Show number of inversions on diagrams.
Expand Down
6 changes: 4 additions & 2 deletions lib/DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ flowchart TD;
layerlens.dart-->src;
```

Inversions in this folder: 0
Inversions including subfolders: 0.
### Inversions
In this folder: 0

Including sub-folders: 0

6 changes: 4 additions & 2 deletions lib/src/DEPENDENCIES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ layering.dart-->model.dart;
model.dart-->primitives.dart;
```

Inversions in this folder: 0
Inversions including subfolders: 0.
### Inversions
In this folder: 0

Including sub-folders: 0

6 changes: 4 additions & 2 deletions lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,13 @@ class MdGenerator {
result.writeln(items.join('\n'));
result.writeln('```');
result.writeln('');
result.writeln('### Inversions');
result.writeln(
'Inversions in this folder: ${folder.localInversions}',
'In this folder: ${folder.localInversions}',
);
result.writeln('');
result.writeln(
'Inversions including subfolders: ${folder.totalInversions}.',
'Including sub-folders: ${folder.totalInversions}',
);
result.writeln('');

Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: layerlens
version: 1.0.14
version: 1.0.15
description: Generate a dependency diagram in every folder of your source code.
repository: https://github.com/polina-c/layerlens

Expand Down
4 changes: 2 additions & 2 deletions test/generator_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void main() {
final content =
MdGenerator.content(analyzer.root.children['lib'] as SourceFolder);
expect(content, contains('--!-->'));
expect(content, contains('Inversions in this folder: 1'));
expect(content, contains('Inversions including subfolders: 2'));
expect(content, contains('this folder: 1'));
expect(content, contains('sub-folders: 2'));
});
}

0 comments on commit 84424eb

Please sign in to comment.