Skip to content

Commit

Permalink
small format
Browse files Browse the repository at this point in the history
  • Loading branch information
roipeker committed Sep 13, 2021
1 parent f2cb056 commit d56eb10
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions lib/src/io/dart_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,13 +353,14 @@ String _buildTKeyMap({
fieldName = _removeInvalidChars(fieldName);

/// adjust variable to not be private.
if( fieldName.startsWith('_')){
if (fieldName.startsWith('_')) {
fieldName = fieldName.substring(1);
}
final c = fieldName.toLowerCase();

/// check for reserved key words or if we are left with a digit only field
/// name.
if ( reservedWords.contains(c) || c.startsWith(onlyDigitRegExp)) {
if (reservedWords.contains(c) || c.startsWith(onlyDigitRegExp)) {
changedWords.add(fieldName);
fieldName = 't$fieldName';
}
Expand Down
5 changes: 3 additions & 2 deletions publish.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh -x
dartfmt -w .
dart pub publish
#dartfmt -w .
dart format --fix .
dart pub publish

0 comments on commit d56eb10

Please sign in to comment.